MONTH is an date function and returns an integer that represents the month of the specified date.
MONTH Syntax:
MONTH (date)
MONTH Example:
SELECT MONTH('2014-03-01') as Month_1,
MONTH('2014-03-01 08:38:49.1234567 +07:10') as Month_2,
MONTH(SYSDATETIME()) as Month_3;
Month_1 | Month_2 | Month_3 |
---|---|---|
3 | 3 | 3 |