Skip to main content
Version: V1.0.0

DAYOFWEEK

Declaration

DAYOFWEEK(date)

Description

Returns the position of the date or datetime date in the week, starting from Sunday.

Example

SELECT DAYOFWEEK('2021-07-15');
+-------------------------+
| DAYOFWEEK('2021-07-15') |
+-------------------------+
| 5 |
+-------------------------+
1 row in set (0.001 sec)