SQL WEEKOFYEAR()函數
WEEKOFYEAR(date)
返回日期用數字表示的範圍是從1到53的日曆周。WEEKOFYEAR()是一個兼容性函數,它等效於WEEK(date,3)。
mysql> SELECT WEEKOFYEAR('1998-02-20'); +---------------------------------------------------------+ | WEEKOFYEAR('1998-02-20') | +---------------------------------------------------------+ | 8 | +---------------------------------------------------------+ 1 row in set (0.00 sec)