dayofweek_iso
Returns the ISO standard day of the week for the specified date as an integer within the range of 1
to 7
. In this standard, 1
represents Monday, and 7
represents Sunday.
Syntaxβ
INT DAY_OF_WEEK_ISO(DATETIME date)
Parametersβ
date
: the date you want to convert. It must be of the DATE or DATETIME type.
Examplesβ
The following example returns the ISO standard day of the week for the date 2023-01-01
:
MySQL > select dayofweek_iso('2023-01-01');
+-----------------------------+
| dayofweek_iso('2023-01-01') |
+-----------------------------+
| 7 |
+-----------------------------+
Keywordsβ
DAY_OF_WEEK_ISO