DAYOFYEAR(date)
返回一年中日期的天数值(一年中第几天),范围为1至366。
mysql> SELECT DAYOFYEAR('1998-02-03'); +---------------------------------------------------------+ | DAYOFYEAR('1998-02-03') | +---------------------------------------------------------+ | 34 | +---------------------------------------------------------+ 1 row in set (0.00 sec)