LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 4 Jan 2010 17:53:55 -0800
Reply-To:     Patrick <patrick.matter@GMX.CH>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Patrick <patrick.matter@GMX.CH>
Subject:      Re: &sysdate question
Comments: To:
Content-Type: text/plain; charset=ISO-8859-1

What oloolo tries to tell you here: &sysdate contains the start date of the SAS session (i.e. the date you connected via SAS EG to the server).

If you want the date of when the code was executed you have to use the SAS function date(), i.e:

%let rundate=%sysfunc(date(),date9.); data a; format a$7.; a= "&rundate" ; run; proc print;run;

or even better: %let rundate=%sysfunc(date()); data a; format a date9.; retain a &rundate. ; run; proc print;run;

Back to: Top of message | Previous page | Main SAS-L page