years_add
Description
Syntax:
DATETIME YEARS_ADD(DATETIME date, INT years)
This function adds the specified years to the given date.
date
can be of DATE or DATETIME type, and the returned result is of the same type as date
.
Example
mysql> select years_add("2020-01-31 02:02:02", 1);
+-------------------------------------+
| years_add('2020-01-31 02:02:02', 1) |
+-------------------------------------+
| 2021-01-31 02:02:02 |
+-------------------------------------+
Keywords
YEARS_ADD