MONTH Function
The MONTH function returns an integer corresponding to the month portion of its DATE or DATETIME argument.
Like
the DAY, YEAR, WEEKDAY, and QUARTER built-in
time functions, the MONTH function extracts information from
a single DATE or DATETIME expression that is its argument. The return
value is the ordinal position of that month within the sequence
of months in a calendar year. On September 23, for example, the function
expression MONTH(TODAY)
returns 9
,
The
following example returns a number that can range from
1
through 12
to
indicate the month when the order was placed: SELECT order_num, MONTH(order_date) FROM orders;