MySQL weekyear()函數
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)