Loading lesson path
Concept visual
Start at both ends
Return the day of the year for a date:
SELECT DAYOFYEAR("2017-06-15");The DAYOFYEAR() function returns the day of the year for a given date (a number from 1 to 366).
date )
Required. The date to return the day of the year fromFrom MySQL 4.0
Return the day of the year for a date:
SELECT DAYOFYEAR("2017-01-01");Return the day of the year for the current system date:
SELECT DAYOFYEAR(CURDATE());❮ MySQL Functions