WEEKDAY
Return the weekday index. This function returns the index of the day of the week (0=Monday, 6=Sunday).
Syntax
WEEKDAY(date)Description
Examples
SELECT WEEKDAY('2008-02-03 22:23:00');
+--------------------------------+
| WEEKDAY('2008-02-03 22:23:00') |
+--------------------------------+
| 6 |
+--------------------------------+
SELECT WEEKDAY('2007-11-06');
+-----------------------+
| WEEKDAY('2007-11-06') |
+-----------------------+
| 1 |
+-----------------------+Last updated
Was this helpful?

