$adddays
$adddays
Calculates a date value by adding days to (or subtracting days from) from a specified date value.
Syntax
$adddays(date,number)
where
date | a date, or an expression that evaluates to a DATE data type |
number | a number, or an expression that evaluates to a number |
Return Value
Number, representing a DATE value.
Comments
Use $adddays to perform arithmetic with date values. $Adddays calculates a date value by adding a number representing days to a date value. If number is negative, the effect is to subtract the days from the date.
The + (add) and – (subtract) operators can be used to achieve the same results.
If date or the result of the functional expression is an invalid date (e.g., 19930231), it is adjusted to produce a valid date (e.g., 19930228).
Example
If $Date has the value 19981225, then
$adddays($date,5)
Evaluates to 19981230.
$adddays($date,7)
Evaluates to 19990101.
$adddays($date,-5)
Evaluates to 19981220.
$adddays(19990201,30)
Evaluates to 19990303.