SAS Date Value - Jan. 1, 1960
SAS stores date value as numeric values while SAS date is stored as numbers.
SAS stores dates and times as single, unique numbers so that you can use them in programs like any other numeric variable:
A SAS date value is a value that represents the number of days between January 1, 1960, and a specified date. SAS can perform calculations on dates ranging from A.D. 1582 to A.D. 19,900. Dates before January 1, 1960, are negative numbers; dates after are positive numbers.
/*************************************/
/* set system options for report */
/*************************************/
options nodate nonumber;
options nodate pageno=1 linesize=64 pagesize=60;
/*************************************/
/* create temporary data set */
/*************************************/
data test;
Time1=86399;
format Time1 datetime.;
Date1=86399;
format Date1 date.;
Time2=86399;
format Time2 timeampm.;
Date1Month=month(Date1);
run;
/*************************************/
/* OUTPUT */
/*************************************/
The SAS System
Obs Time1 Date1 Time2 Date1Month
1 01JAN60:23:59:59 20JUL96 11:59:59 PM 7
No comments:
Post a Comment