proc export data=work.dataset
outfile="&ExportLoc./ABC_%sysfunc(date(),yymmdd8.)%sysfunc(hour(%sysfunc(time())),z2.)%sysfunc(minute(%sysfunc(time())),z2.)%sysfunc(second(%sysfunc(time())),z2.)_PROVIDER_TRIGGER.xlsx"
dbms=xlsx replace;
run;
With a picture format:
proc format;
picture mytmefmt
low-high = '%Y%0m%0d%0H%0M%0S'
(datatype=datetime);
run;
%put %sysfunc(datetime(), mytmefmt.);
proc export data=work.dataset
outfile="&ExportLoc./ABC_%sysfunc(date(),yymmdd8.)%sysfunc(hour(%sysfunc(time())),z2.)%sysfunc(minute(%sysfunc(time())),z2.)%sysfunc(second(%sysfunc(time())),z2.)_PROVIDER_TRIGGER.xlsx"
dbms=xlsx replace;
run;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.