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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.