Running macro with huge loops, and like to print out the end time of each loop in format, such as hhmmss[or with millisecond].
Need this to tell time cost for each loop.
Simply %put "%sysfunc(time())"; does print out time info, but without format, hard to tell.
44497 %put "%sysfunc(time())";
"84736.9679999351"
So why just add a FORMAT to the %SYSFUNC() call?
%put %sysfunc(time(),time12.3);
Or perhaps better use DATETIME() function so you can track jobs that cross midnight.
%put %sysfunc(datetime(),datetime24.3);
%SYSFUNC allows formats:
%put %sysfunc(time(),time8.);
Assign whatever date/time format you want, like this:
%put %sysfunc(datetime(),datetime19.);
So why just add a FORMAT to the %SYSFUNC() call?
%put %sysfunc(time(),time12.3);
Or perhaps better use DATETIME() function so you can track jobs that cross midnight.
%put %sysfunc(datetime(),datetime24.3);
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.