Built-in Functions → addYears
addYears() is a scalar date function that returns the sum of a date
value and a specified number of years, in which the integer number (+/-) of years added to a given date is in the format "yyyy-MM-dd".
Signature
addYears(date exp, int years)
The following table illustrates the addYears() parameters:
Parameter | Description |
---|---|
date exp | date to add time to |
int years | int years to add to date exp |
Returns
date
Example
Add 1 year to the dates in Sales_Acme.Sales.TIME_ID.
addYears(Sales_Acme.Sales.TIME_ID, 1)