A couple of useful things to do with the current time:
1. Put it at the top and bottom of your program for a quick & easy way of seeing how long a program took to execute.
e.g.
%let datetime_start = %sysfunc(TIME()) ;
%put START TIME: %sysfunc(datetime(),datetime14.);
... program code ...
%put END TIME: %sysfunc(datetime(),datetime14.);
%put PROCESSING TIME: %sysfunc(putn(%sysevalf(%sysfunc(TIME())-&datetime_start.),mmss.)) (mm:ss) ;
2. It's also useful to put this in a footnote for output that will be archived.
e.g.
footnote2 "%sysfunc(datetime(),datetime14.)";
This tip was originally posted by Robert Matthews on sasCommunity.org.