Mega Code Archive
DAYOFYEAR(date) returns the day of the year for date, in the range 1 to 366
mysql>
mysql> SELECT DAYOFYEAR('1998-02-03');
+-------------------------+
| DAYOFYEAR('1998-02-03') |
+-------------------------+
| 34 |
+-------------------------+
1 row in set (0.00 sec)
mysql>