The SAS Output Delivery System and reporting techniques

Date Stamp

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

Date Stamp

Hi. 

 

I have created a report using ods layout. I would like the date the report was run to appear on the report. Does anyone know how to do this?

 

Thank you for your help.

 


Accepted Solutions
Solution
‎01-06-2016 03:04 PM
Super User
Posts: 18,997

Re: Date Stamp

Use the sysfunc version and change the date9 format applied to worddate or some variation of that. Check the documentation on date formats for the format you want.

View solution in original post


All Replies
Super User
Posts: 18,997

Re: Date Stamp

[ Edited ]

Include it in the title or footnote somehow? The macro variable &sysdate holds the date.

footnote1 "Report run on: &sysdate.";

 

EDIT: sysdate doesn't change during a session, I'm not sure if you're running the same session day to day it would change. Anyways you can use the date() function to get the date if required. 

 

footnote1 "Report run on: %sysfunc(today(), date9.)";

Contributor
Posts: 24

Re: Date Stamp

Thank you Reeza.

 

I am using it within an ods txt. 

 

It is showing up as 06JAN16.

 

Is there a way I can get it to appear as January 06, 2016?

 

thank you again. 

Solution
‎01-06-2016 03:04 PM
Super User
Posts: 18,997

Re: Date Stamp

Use the sysfunc version and change the date9 format applied to worddate or some variation of that. Check the documentation on date formats for the format you want.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 433 views
  • 0 likes
  • 2 in conversation