DAYOFWEEK

Return the weekday index for a date or timestamp:

Syntax

DAYOFWEEK(date)

Example

SELECT DAYOFWEEK('2020-06-20');

The above query returns:

7