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)