ID EN
Date and Time Functions

DAYOFYEAR(date)

MySQL 8.4

Returns the day of the year for date, in the range 1 to 366. Returns NULL if date is NULL.

Syntax

MYSQL
SELECT DAYOFYEAR('2007-02-03');
34

Examples

Example
MYSQL
SELECT DAYOFYEAR('2007-02-03');
34