DATA Step, Macro, Functions and more

How to write run date/time into .rtf file

Reply
Contributor
Posts: 35

How to write run date/time into .rtf file

I am using the options date on the .rtf report to display the report creation date/time. But when I open the report later on, the date/time changes to the date/time of report opening, not of report creation.

How can I write the date/time to the .rtf file and make it stay, instead of dynamically change?

Please help
Super Contributor
Super Contributor
Posts: 3,174

Re: How to write run date/time into .rtf file

What code is generating the "date"? There are many possible techniques, so it's best that you share your particular SAS code.

Scott Barry
SBBWorks, Inc.
Contributor
Posts: 35

Re: How to write run date/time into .rtf file

I was using Default Options, i.e, Options Date.
Trusted Advisor
Posts: 2,113

Re: How to write run date/time into .rtf file

If you use
OPTIONS DATE;
to put the date in the title line in the RTF destination, it uses the RTF "current date" function. Argh! It's a "feature" that I really dislike.

To get the actual date in the title or footer, use the &sysdate macro variable in the TITLE or FOOTER and
OPTIONS NODATE;
Contributor
Posts: 35

Re: How to write run date/time into .rtf file

> If you use
> OPTIONS DATE;
> to put the date in the title line in the RTF
> destination, it uses the RTF "current date" function.
> Argh! It's a "feature" that I really dislike.
>
> To get the actual date in the title or footer, use
> the &sysdate macro variable in the TITLE or FOOTER
> and
> OPTIONS NODATE;

Thank you very much for your message. I'll use the &sysdate.
SAS Super FREQ
Posts: 8,743

Re: How to write run date/time into .rtf file

Hi:
You also might want to check out the SASDATE option for the ODS RTF destination:
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002233360.htm#a003137833

cynthia
Contributor
Posts: 35

Re: How to write run date/time into .rtf file

> Hi:
> You also might want to check out the SASDATE
> option for the ODS RTF destination:
> ttp://support.sas.com/documentation/cdl/en/odsug/61723
> /HTML/default/a002233360.htm#a003137833
>
> ynthia

Thank you very much, Synthia, for the link.
Ask a Question
Discussion stats
  • 6 replies
  • 718 views
  • 0 likes
  • 4 in conversation