dayofweek(param) – Returns the day of the week of date/timestamp (1 = Sunday, 2 = Monday, …, 7 = Saturday)
param can be one of:
- A string in the format of ‘yyyy-MM-dd HH:mm:ss’ or ‘yyyy-MM-dd’.
- A date value
- A timestamp valueExample:
SELECT dayofweek(‘2009-07-30’) FROM src LIMIT 1;
5