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.
Extracting data from a Datetime value - SAS Tutorial
From the course: SAS® 9.4 Cert Prep: Part 10 Manipulating Data with Functions
Extracting data from a Datetime value
- [Instructor] There are many formats that you can use to display both the date and time component of a SAS datetime value, but what if you want to separate the date or time value and create new columns? You can do this with either the DATEPART or TIMEPART function. For both functions, the only required argument is a SAS datetime value. The functions return raw SAS date and SAS time numeric values, and you can apply a format to improve the display.
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)
-
-