Hello Everyone,
can someone explain why this works fine:
data worksfine;
starttime = time();
duration = 5;
stoptime = intnx('minute', starttime, duration, 'S');
stoptime2 = intnx('minute', time(), duration, 'S');
put _ALL_;
format starttime stoptime: time8.;
run;
But this does not work:
/*Stop Time*/
%LET s_time = %sysfunc(intnx('minute', %sysfunc(time()), 5, 'S'));
%PUT &s_time.;
Cheers,
FK
Since the macro preprocessor is a pure text processor, quotes are not needed for string values:
%LET s_time = %sysfunc(intnx(minute,%sysfunc(time()),5,S),time8.);
%PUT &s_time.;
Since the macro preprocessor is a pure text processor, quotes are not needed for string values:
%LET s_time = %sysfunc(intnx(minute,%sysfunc(time()),5,S),time8.);
%PUT &s_time.;
Thank's Kurt for helping me out!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.