BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GreggB
Pyrite | Level 9
proc print data=sashelp.cars (obs=1);
title "Report for &sysdate";
run;

No idea how to fix this....

 

                                                                                        Report for 13FEB20

Obs Make Model Type Origin DriveTrain MSRP Invoice EngineSize Cylinders Horsepower MPG_City MPG_Highway Weight Wheelbase Length
1 Acura MDX SUV Asia All $36,945 $33,337 3.5 6 265 17 23 4451 106 189

                                                                                       
1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

Can you use today(), since SYSDATE contains the date on which a SAS job or session began executing which likely means you didn't start your session today. So TODAY() function is a good bet

 

proc print data=sashelp.cars (obs=1);
title "Report for %sysfunc(today(),date9.)";
run;

 

 

 

Report for 14FEB2020

Obs Make Model Type Origin DriveTrain MSRP Invoice EngineSize Cylinders Horsepower MPG_City MPG_Highway Weight Wheelbase Length
1 Acura MDX SUV Asia All $36,945 $33,337 3.5 6 265 17 23 4451 106 189

 

View solution in original post

2 REPLIES 2
novinosrin
Tourmaline | Level 20

Can you use today(), since SYSDATE contains the date on which a SAS job or session began executing which likely means you didn't start your session today. So TODAY() function is a good bet

 

proc print data=sashelp.cars (obs=1);
title "Report for %sysfunc(today(),date9.)";
run;

 

 

 

Report for 14FEB2020

Obs Make Model Type Origin DriveTrain MSRP Invoice EngineSize Cylinders Horsepower MPG_City MPG_Highway Weight Wheelbase Length
1 Acura MDX SUV Asia All $36,945 $33,337 3.5 6 265 17 23 4451 106 189

 

PaigeMiller
Diamond | Level 26

You should see what &SYSDATE does on April Fool's Day.

--
Paige Miller

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 772 views
  • 1 like
  • 3 in conversation