Skip to main content

QUARTERS_ADD

Description​

Syntax​

DATE/DATETIME QUARTERS_ADD(DATE/DATETIME date, INT years)

Add a specified number of quarters to a given date

The parameter date can be of type DATETIME or DATE, and the return type is the same as the type of the parameter date.

Example​

mysql> select quarters_add("2020-01-31 02:02:02", 1);
+---------------------------------------------------------------+
| quarters_add(cast('2020-01-31 02:02:02' as DATETIMEV2(0)), 1) |
+---------------------------------------------------------------+
| 2020-04-30 02:02:02 |
+---------------------------------------------------------------+
1 row in set (0.10 sec)

keywords​

QUARTERS, ADD, QUARTERS_ADD