PERIOD_ADD(P,N)
Adds N
months to period P
. P
is in the format YYMM or YYYYMM, and is not a date value. If P
contains a two-digit year, values from 00 to 69 are converted to from 2000 to 2069, while values from 70 are converted to 1970 upwards.
Returns a value in the format YYYYMM.
SELECT PERIOD_ADD(200801,2); +----------------------+ | PERIOD_ADD(200801,2) | +----------------------+ | 200803 | +----------------------+ SELECT PERIOD_ADD(6910,2); +--------------------+ | PERIOD_ADD(6910,2) | +--------------------+ | 206912 | +--------------------+ SELECT PERIOD_ADD(7010,2); +--------------------+ | PERIOD_ADD(7010,2) | +--------------------+ | 197012 | +--------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/period_add/