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 Tutorial
From the course: SAS® 9.4 Cert Prep: Part 10 Manipulating Data with Functions
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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Useful numeric functions1m 5s
-
Demo: Using numeric functions2m 57s
-
(Locked)
SAS Date, Datetime, and Time Values53s
-
(Locked)
Extracting data from a Datetime value30s
-
(Locked)
Calculating date intervals2m 1s
-
(Locked)
Shifting date values50s
-
(Locked)
Demo: Shifting date values based on an interval3m 14s
-
(Locked)
-
-