The form of the INTNX function is
INTNX ( interval, from, n < , alignment > ) ;
The arguments to the INTNX function are as follows:
interval
is a character constant or variable that contains an interval name
from
is a SAS date value (for date intervals) or datetime value (for datetime intervals)
n
is the number of intervals to increment from the interval that contains the from value
alignment
controls the alignment of SAS dates, within the interval, used to identify output observations. Allowed values are BEGINNING, MIDDLE, END, and SAMEDAY.
The number of intervals to increment, n, can be positive, negative, or zero.
For example, the statement NEXTMON=INTNX(’MONTH’,DATE,1) assigns to the variable NEXTMON the date of the first day of the month following the month that contains the value of DATE. Thus INTNX(’MONTH’,’21OCT2007’D,1) returns the date 1 November 2007.
|