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>
Subject: Re: sys - datetime?
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.
Thank you for the suggestions! What worked the best was using datetime
(); doing the trick in the fewest steps. thanks!