Date: Tue, 11 Jun 1996 06:10:00 GMT
Reply-To: "K. Beckman" <102146.2003@COMPUSERVE.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "K. Beckman" <102146.2003@COMPUSERVE.COM>
Organization: CompuServe Incorporated
Subject: SAS Date Value
I would like to point something about SAS date values:
>Paul, SAS stores Julian dates as numbers like 89300 for the 300th day of
>1989. The SAS date value for 89300 is the number of days since 1/1/80, or
"A date in SAS is represented by the number of days between January 1,
1960 and that date"
-- SAS User's Guide: Basics, Version 5 Edition, pp 528
This integer number is what is STORED and when displayed with a
numeric format it doesn't look like a date at all.
> You can display a SAS date value using many different formats:
> PUT TODAY 5.0 TODAY MMDDYY8. TODAY JULIAN5.;
This statement is true and this piece of code illustrates the point --
we are displayong the same SAS data value using different formats.
>You can interchange SAS date and SAS Julian date values:
There is no such thing as a "SAS Julian date value!" There is only
the SAS date value stored as described above which then may be
DISPLAYED in any number of date formats, including Julian.
> * ROUND is OK because day portion will never exceed 366;
I think this code only serves to confuse the neophyte. We already
have the SAS date variable "TODAY" so if we want to display (write) it
in a julian FORMAT all we need is to use that format (as the author
has already shown above). The functions YEAR and DAY are already
available for extracting day of the month and year from a SAS date
value (if there is some reason to do so) and, along with the TODAY
function are easily confused with the variable names used in the
>Tim Berryhill - Contract Programmer and General Wizard
>Frequently at Pacific Gas & Electric Co., San Francisco
>The correlation coefficient between their views and
>my postings is slightly less than 0
>----------------------[Reply - Original Message]----------------------
>Sent by:Paul Boon <Pboon@MINERVA.CIS.YALE.EDU>
> Dear SasUsers;
>Is it possible to convert a Julian and a sas date value back to MMDDYY.
I hope this helps.
Kurt D. Beckman
553 N. Pacific Coast Hwy, Suite B288
Redondo Beach, California 90277