Categories: Date/Time
DAYOFWEEK
Returns the day of the week (from 1 to 7) of the date or timestamp.
Syntax
DAYOFWEEK(date_timestamp_expression string) → bigint
- date_timestamp_expression: A
DATE
orTIMESTAMP
expression.
Examples
DAYOFWEEK exampleSELECT DAYOFWEEK(DATE '2021-02-28')
-- 1
SELECT DAYOFWEEK(TIMESTAMP '2021-02-27 11:43:22')
-- 7
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.