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