DAYOFYEAR(date_exp)

Returns the day of the year based on the year field in date_exp as an integer value in the range of 1-366.

 

Example:

SELECT DAYOFYEAR({d '2001-09-13'}) returns 256