MONTH
Extracts the month number (from 1 to 12) for a given date or timestamp.
Syntax
EXTRACT(MONTH FROM date_timestamp_expression string) → bigint
date_timestamp_expression: A
DATE
orTIMESTAMP
expression.
Examples
MONTH example using a timestamp.
MONTH example using a date.
MONTH example using the CAST function.
Usage Notes
This function uses the EXTRACT
function. When using the CAST
function, timestamps containing milliseconds are not allowed.
Last updated