QUARTER
Extracts the quarter number (from 1 to 4) for a given date or timestamp.
Syntax
EXTRACT(QUARTER FROM date_timestamp_expression string) → bigint
date_timestamp_expression: A
DATE
orTIMESTAMP
expression.
Examples
QUARTER example using a timestamp.
QUARTER example using a date.
QUARTER 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