@HspDateRoll
This function returns the next date, resulting from adding noOfPeriods to startDate.
Syntax
@HspDateRoll(startDate,noOfPeriods,periodType)
Parameter | Description |
---|---|
startDate | The Start date from which the date has to be rolled. It must be type date. |
noOfPeriods | The number of periods. If given a negative value, the date is rolled back. This must be an integer. |
periodType | The Period type is an integer where:
|
Notes
The return value is a date in YYYYMMDD format.
The start date can be a date in YYYYMMDD format, a variable, or an actual date value.
Example
This example forwards the roll date by 1 month.
@HspDateRoll(20100101,1,2)
This returns 20100201.
Example
This example gets the date one quarter prior to 20101001.
@HspDateRoll(20100101,-1,3)