Date: Thu, 21 Jun 2007 14:43:13 -0400
Reply-To: "Audimar P. Bangi" <audi@SAS2THEMAX.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Audimar P. Bangi" <audi@SAS2THEMAX.COM>
Organization: sas2themax.com
Subject: Re: DATETIME conversion by SAS 9
In-Reply-To: <006001c7b432$cf5c36c0$6e14a440$@com>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
Hey Alan,
Of course, I'm aware of SAS having no System.DateTime type, and that dates
are stored as numeric values computed with Jan 1, 1960 12:00 AM as the
reference.
You can look at the way my Notebook does date conversions by opening an
already existing SAS dataset containing variables with date format(s).
Audi
----- Original Message -----
From: "Alan Churchill" <savian001@gmail.com>
To: "'Audimar P. Bangi'" <audi@SAS2THEMAX.COM>; <SAS-L@LISTSERV.UGA.EDU>
Sent: Thursday, June 21, 2007 2:34 PM
Subject: RE: DATETIME conversion by SAS 9
Audi,
SAS does not have a date or datetime type, only a 'numeric' type. If the
format associated with a numeric field is datetime, it will treat that
numeric as the number of seconds past midnight of Jan 1, 1960. You can
easily change that format to a date and get the number of days since Jan 1,
1960 as well. The value isn't changing, merely which format is associated.
SAS only has strings and numerics and a format is simply display technology,
nothing more.
Try it. Use a date and datetime format on any numeric field.
Alan
Alan Churchill
Savian "Bridging SAS and Microsoft Technologies"
www.savian.net
|