Home >Database >Mysql Tutorial >How to use PERIOD_ADD function in MySQL
PERIOD_ADD(month, add)
SELECT PERIOD_ADD(1601,2) SELECT PERIOD_ADD(191602,3) SELECT PERIOD_ADD(191602,-3)
-> 201603 -> 191605 -> 191511
This function returns the operation result of increasing or decreasing month. The format of month is yyMM or yyyyMM, and the results returned are in yyyyMM format. , add can pass negative values
The above is the detailed content of How to use PERIOD_ADD function in MySQL. For more information, please follow other related articles on the PHP Chinese website!