MySQL dayofyear()函數
DAYOFYEAR(date)
返回年份為日期的天,範圍為1至366。
mysql> SELECT DAYOFYEAR('1998-02-03'); +---------------------------------------------------------+ | DAYOFYEAR('1998-02-03') | +---------------------------------------------------------+ | 34 | +---------------------------------------------------------+ 1 row in set (0.00 sec)