Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Feb 14, 2025
Send us feedback
dayofweek
Applies to: Databricks SQL Databricks Runtime
Returns the day of week of the date or timestamp. This function is a synonym for extract(DAYOFWEEK FROM expr).
extract(DAYOFWEEK FROM expr)
dayofweek(expr)
expr: A DATE or TIMESTAMP expression.
expr
An INTEGER where 1 = Sunday, and 7 = Saturday.
1 = Sunday
7 = Saturday
> SELECT dayofweek('2009-07-30'); 5
day function
dayofmonth function
dayofyear function
hour function
minute function
second function
extract function
weekday function