D/MySQL
MySQL PERIOD_ADD()
yeon.Biju
2020. 4. 2. 14:35
MySQL 날짜함수, 시간함수
PERIOD_ADD()
- 날짜에 달(월)을 더해주는 함수
PERIOD_ADD(P, N)
의 형태
Adds N months to period P(int the format YYMM or YYYYMM). Returns a value in the foramt YYYYMM.
The period argument P is niot a date value.
mysql> SELECT PERIOD_ADD(202001, 2);
+-----------------------+
| PERIOD_ADD(202001, 2) |
+-----------------------+
| 202003 |
+-----------------------+
1 row in set (0.00 sec)