month
Returns the month for a given date. The return value ranges from 1 to 12.
The date
parameter must be of the DATE or DATETIME type.
Syntaxβ
INT MONTH(DATETIME date)
Examplesβ
MySQL > select month('1987-01-01');
+-----------------------------+
|month('1987-01-01 00:00:00') |
+-----------------------------+
| 1 |
+-----------------------------+
keywordβ
MONTH