DAYOFWEEK

2023-12-25 08:49:42  Updated

Syntax

DAYOFWEEK(date)

Purpose

DAYOFWEEK() returns the ordinal number of the day in the week of date, starting on Sunday.

Examples

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

Contact Us