mysql.h


WEEKDAY()

WEEKDAY(date)

Devuelve el índice del día de la semana para la fecha date (0 = Lunes, 1 = Martesy, ... 6 = Domingo):

mysql> SELECT WEEKDAY('1998-02-03 22:23:00');
+--------------------------------+
| WEEKDAY('1998-02-03 22:23:00') |
+--------------------------------+
|                              1 |
+--------------------------------+
1 row in set (0.00 sec)

mysql> SELECT WEEKDAY('1997-11-05');
+-----------------------+
| WEEKDAY('1997-11-05') |
+-----------------------+
|                     2 |
+-----------------------+
1 row in set (0.00 sec)