ID EN
Date and Time Functions

PERIOD_ADD(P,N)

MySQL 8.4

Adds N months to period P (in the format YYMM or YYYYMM). Returns a value in the format YYYYMM.

Syntax

MYSQL
SELECT PERIOD_ADD(200801,2);
200803

Examples

Example

The period argument P is not a date value.

MYSQL
SELECT PERIOD_ADD(200801,2);
200803