Hello
Please help me in changing the date, time stamp set for SAS 9.1 as it is incorrect.
@ShrutiD Your question has motivated me to see if there is an option to control the date/time info on listings and logs. And I've learned that there is:
OPTIONS NODTRESET;
means that the session start date and time are used in your procedure printout. This is the sas default on all the systems I have used.
OPTIONS DTRESET;
means that the time of procedure execution is used.
The options statement is global. I.e. it doesn't belong to a proc step or data step. When you issue it, all subsequent steps honor it.
So put OPTIIONS DTREST prior to your proc's of interest. And, if you want, it turns out you can go back to the sas default by issuing OPTIONS NODTRESET after those proc's.
You give give us fewer details but that would be hard.
What do you have? What do you want?
And provide a proc contents of the table if you are talking about data sitting in a table.
Hello Chris
As I am new to SAS, I would request you to help me know how to change the date time stamp seen at the output window
for example in the below date time stamp,I need to alter the day shown(Thursday) as it is incorrect.
12:33 Thursday, February 25, 2018 1
If you're referring to the date time that is printed by default at the bottom of a report, then the default system date is the date the SAS session was started. If you want the date/time you can use the following:
%put %sysfunc(date(), worddate.);
%put %sysfunc(datetime(), datetime.);
This means turning off the SAS default and adding your own date time to the report or ensuring that you use a clean session when submitting a report - i.e. if you run a report via batch process or stored process I would expect it to have the latest date.
footnote1 "This report was run on: %sysfunc(date(), worddate.)";
proc print data=sashelp.class (obs=5) noobs label;
run;
Note this doesn't seem to work on SAS UE for some reason, or at least mine is still reporting the session date:
@ShrutiD Your question has motivated me to see if there is an option to control the date/time info on listings and logs. And I've learned that there is:
OPTIONS NODTRESET;
means that the session start date and time are used in your procedure printout. This is the sas default on all the systems I have used.
OPTIONS DTRESET;
means that the time of procedure execution is used.
The options statement is global. I.e. it doesn't belong to a proc step or data step. When you issue it, all subsequent steps honor it.
So put OPTIIONS DTREST prior to your proc's of interest. And, if you want, it turns out you can go back to the sas default by issuing OPTIONS NODTRESET after those proc's.
@mkeintz that's awesome!
Thank you all for the solution!!
Also, I marked your other -identical- question as spam to avoid duplicates.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.