dayofweek
Returns the day of the week in "date_expression" as an integer in the range 1 to 7, where 1 represents Sunday. "date_expression" can be a date value or a string representation of a date.
Syntax
dayofweek ( date_expression )
Example
dayofweek ( '1998-01-08' )
Result
Returns 5.