- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Please help me in changing the date, time stamp set for SAS 9.1 as it is incorrect.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@mkeintz that's awesome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all for the solution!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Also, I marked your other -identical- question as spam to avoid duplicates.