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 (March 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 9 Mar 2009 14:15:01 -0700
Reply-To:     Tiffany <tiffany.vidal@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Tiffany <tiffany.vidal@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: sys - datetime?
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On Mar 9, 4:53 pm, anindya.lugb...@GMAIL.COM (Anindya Mozumdar) wrote: > > I am trying to obtain the system datetime, but can only seem to obtain > > the date. When I try "&sysdate"dt I get a 1960 value; however > > "&sysdate"d returns the correct date without time. My objective is to > > determine if an event happened more than 1 year from today. I tried > > to subtract my event date from sysdate, but I am not sure what units > > the returned values are in; they are not in seconds, and it doesn't > > look like days either. > > > thank you for any suggestions! > > I would suggest that you use the functions today() and time() to get > the current system date and time. Another option is to use the sysdate > and systime macro variables. "&sysdate"d (and not dt after the quote) > will give you the correct number representing today's date. > > Regards, > Anindya

Thank you for the suggestions! What worked the best was using datetime (); doing the trick in the fewest steps. thanks!


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