week_iso
Returns the ISO standard week of the year for the specified date as an integer within the range of 1
to 53
.
Syntaxβ
INT 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 week of the year for the date 2008-02-20 00:00:00
:
MySQL > select week_iso ('2008-02-20 00:00:00');
+-----------------------------------+
| week_iso('2008-02-20 00:00:00') |
+-----------------------------------+
| 8 |
+-----------------------------------+
Keywordsβ
WEEK_ISO