Getting started
User guides
Administration guides
Reference guides
Resources
Updated Aug 04, 2022
Send us feedback
dayofweek
Returns the day of week of the date or timestamp.
dayofweek(expr)
expr: A DATE or TIMESTAMP expression.
expr
An INTEGER where 1 = Sunday, and 7 = Saturday.
1 = Sunday
7 = Saturday
This function is a synonym for extract(DAYOFWEEK FROM expr).
extract(DAYOFWEEK FROM expr)
> SELECT dayofweek('2009-07-30'); 5
day function
dayofmonth function
dayofyear function
hour function
minute function
second function
extract function
weekday function