SAS Date Value

From Business Intelligence Wiki

Jump to: navigation, search

SAS date values are stored in SAS as the number of days between 1 January 1960 to the date value. For instance, if the date value is 1 January 1961, the value that is stored in the SAS dataset is 366.

Because of how SAS stored date values, if you generate an output using the variables, it would be good to give the date variables a format so that the value can be easily read. Otherwise, it will just display numbers that a reader might not be able to comprehend.

You can assign a default format by using the FORMAT statement in DATA Step or assign a temporary format by using the FORMAT statement in PROC Step.


Personal tools