VeloDB Cloud
SQL Manual
Functions
date-time-functions
month

month

Description

Syntax:

INT MONTH (DATETIME date)

This function fetches the month information in the given date and returns a value ranging from 1 to 12.

The parameter is of DATE or DATETIME type.

Example

mysql> select month('1987-01-01');
+-----------------------------+
| month('1987-01-01 00:00:00') |
+-----------------------------+
|                           1 |
+-----------------------------+

Keywords

MONTH