From the course: SAS® 9.4 Cert Prep: Part 10 Manipulating Data with Functions

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

SAS Date, Datetime, and Time Values

SAS Date, Datetime, and Time Values

- [Instructor] Remember that dates in SAS are stored as the number of days since January 1st, 1960. It's possible for data to also include times or a combination of dates and times. A time value in SAS is stored as the number of seconds from midnight. A datetime value in SAS is stored as the number of seconds from midnight on January 1st, 1960. Just like SAS date values, this numeric storage method enables us to calculate time between two events, or sort by time or datetime. SAS offers a wide variety of data functions that enable you to extract information from date, time or datetime values, perform interval calculations or shift values based on a specified time period. Let's try out some of the common date and time functions with our storm data.

Contents