Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

PERIOD_ADD(P,N) adds N months to period P (in the format YYMM or YYYYMM)

Returns a value in the format YYYYMM. The period argument P is not a date value. mysql> mysql> SELECT PERIOD_ADD(9803,2); +--------------------+ | PERIOD_ADD(9803,2) | +--------------------+ |             199805 | +--------------------+ 1 row in set (0.00 sec) mysql>