Example 9.14 Incrementing a Date by an Interval

Goal

Increment a date by a specific interval such as days, weeks, months, or years. For each starting date, specify the number of times to increment the starting date and the interval to increment it by.

Example Features

Featured StepDATA step
Featured Step Options and StatementsINTNX function
A Closer LookUnderstanding SAS Date and Time Intervals Understanding the Processing of the INTNX Function in This Example

Input Data Set

Data set SCHED_APPTS has a list of appointments for nine patients and information about scheduling new appointments for them. The values of variable APPTDATE are SAS date values, and they are formatted in the listing with the WORDDATE format. The other variables are described ...

Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.