As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tips:Static Dates in RTF Output

From sasCommunity
Jump to: navigation, search

When generating output using ODS RTF, by default SAS inserts a dynamic date field that's updated each time your output is opened. To get the date the program was run, change one option:

Adding a date to a header or footer provides useful information about when a file was created or modified. By default, ODS inserts an RTF control string that corresponds to the Word date field in the page header of RTF output. This means that the date value is updated to the current date each time the file is opened. If you'd prefer the document to reflect the date the program was run, you just need to add one option to your ODS RTF statement:

ODS RTF FILE='StaticDate.rtf' SASDATE;

By adding this option, SAS will insert text for the current date when the program was run. Remember that the SAS date is actually the time and date that you started your SAS session. So, if a programmer keeps his/her session open for days at a time, this date might not correspond to the actual date the program was run.

Submitted by Lauren Haworth. Contact me at my Discussion Page.