month

Return the month

Syntax

month(dt_expr)

Arguments

dt_expr A date expression.

Description

This function returns the month component in the specified date expression as a number between 1 and 12.

Example

select month(curdate()) as "Current Month";

Current Month
            4