Skip to main content
Version: 2.5

month

Description

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