BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BStats
Calcite | Level 5

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
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

3 REPLIES 3
Reeza
Super User

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.)";

BStats
Calcite | Level 5

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. 

Reeza
Super User
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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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