ADD_YEARS
Purpose
This function adds a specified number of years to a date or timestamp.
Syntax
add_years::=
Usage Notes
- Decimals are rounded before adding the number.
- If the resulting month has fewer days than the day of the date of entry, the last day of this month is returned.
- For data type
TIMESTAMP WITH LOCAL TIME ZONE
, this function is calculated within the session time zone.
Example
Result
AY1 | AY2 |
2001-02-28 | 2004-01-31 12:00:00.000000 |