YEARWEEK(date): Get the year and week of the date
SELECT YEARWEEK(SYSDATE()) SELECT YEARWEEK(‘2015-01-10') SELECT YEARWEEK(‘2015-01-10',1)
-> 201602 -> 201501 -> 201502
The above is the detailed content of How to use YEARWEEK function in MySQL. For more information, please follow other related articles on the PHP Chinese website!