Hi, is there a way to insert date after "Date Extraction:" below,
Use a macro variable, and double quotes:
%let date = %sysfunc(today(),yymmdd10.);
proc odstext;
p "Source:"/ style=[color=blue fontsize=12pt fontfamily='Courier New' fontweight=bold];
list;
item "Master Database, Date Extraction: &date." / style=[fontsize=11pt fontfamily='Courier New'];
end;
run;
Hint: use single quotes in SAS only where explicitly needed, or if you need to prevent the resolution of macro triggers.
a macro variable for start?
%let date=%sysfunc(int('14mar2024'd),yymmdd10.);
proc odstext;
p 'Source:'/ style=[color=blue fontsize=12pt fontfamily='Courier New' fontweight=bold];
list;
item "Master Database, Date Extraction: &date." / style=[fontsize=11pt fontfamily='Courier New'];
end;
run;
Bart
Use a macro variable, and double quotes:
%let date = %sysfunc(today(),yymmdd10.);
proc odstext;
p "Source:"/ style=[color=blue fontsize=12pt fontfamily='Courier New' fontweight=bold];
list;
item "Master Database, Date Extraction: &date." / style=[fontsize=11pt fontfamily='Courier New'];
end;
run;
Hint: use single quotes in SAS only where explicitly needed, or if you need to prevent the resolution of macro triggers.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.