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,700 courses taught by industry experts.
Demo: Shifting date values based on an interval - SAS Tutorial
From the course: SAS® 9.4 Cert Prep: Part 10 Manipulating Data with Functions
Demo: Shifting date values based on an interval
- We would like to identify dates before or after major storms to compare property values. We'll create a new column called assessment date that will use the INTNX function to shift dates based on when the storm began. Let's take a look at this first assignment statement for assessment date. The INTNX function has three arguments. The first argument is the interval or time period, so we'll use month. The second argument is the start date. And the third argument is the increment. So, what is returned from this expression? Notice that the original dates are whatever the specific date was when the storm began. The assessment date has been shifted to the first of the same month. Well let's try a few other combinations of arguments. What if I change the interval to two and re-run the program? Notice now that the assessment date has shifted forward by two months but the date within the month is still returned as the first.…
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)
-
-