Page 40 - SAS_manual
P. 40
10/21/1950 Month – Day – Year
21/10/1950 Day – Month – Year
21Oct1950 Day – Month Abbreviation – Year
50294 Julian Date
However, SAS does not normally store dates in any of these forms—it converts all of these dates into a
single number—the number of days from January 1, 1960. Dates after January 1, 1960, are positive
integers; dates before January 1, 1960, are negative integers. For example, the following table shows
some dates and the internal values stored by SAS:
Date SAS Internal Value
January 1, 1960 0
January 2, 1960 1
December 31, 1959 -1
June 15, 2006 16,967
October 21, 1950 -3,359
Program 4.14: Output:
For storing a date value we have to follow the above syntax as DOB stores and for showing the date in
appropriate format we have to use format as previously discussed.
Date functions:
Purpose: Syntax
TODAY Return today date value today( )
DATE Return date value date( )
TIME Return time value time( )
DATETIME Return both date and time value datetime( )
SAS HANDBOOK | VISIT:: http://nikhilanalytics.com 40

