ADD_YEARS
Description
ADD_YEARS adds a given number of years to a given date.
Supported input column types: base_column -> DATE, years_column -> INT
Output column type: DATE
If the input date is last day of the month, the resulting date will be last day of the month.
If a result of type DATE is outside the interval from the year 1400 CE (including) to the year 10000 CE (excluding), it will be mapped to NULL.
Syntax
ADD_YEARS ( table.base_column, table.years_column )
NULL handling
If any parameter is NULL, the result is NULL as well.
Example
[1] Simple example for ADD_YEARS. | ||||||||||||||||
| ||||||||||||||||
|
[2] Leap years behavior with ADD_YEARS. | |||||||||||||||||||
| |||||||||||||||||||
|