SELECT MID(YEARWEEK('2000-01-01'),5,2); : YEARWEEK « Date Time Functions « MySQL Tutorial






mysql>
mysql> SELECT MID(YEARWEEK('2000-01-01'),5,2);
+---------------------------------+
| MID(YEARWEEK('2000-01-01'),5,2) |
+---------------------------------+
| 52                              |
+---------------------------------+
1 row in set (0.00 sec)

mysql>








14.59.YEARWEEK
14.59.1.YEARWEEK(date), YEARWEEK(date,mode) returns year and week for a date.
14.59.2.SELECT YEARWEEK('2000-01-01');
14.59.3.SELECT MID(YEARWEEK('2000-01-01'),5,2);