DAYOFYEAR

Return the day of the year for a date or timestamp:

Syntax

DAYOFYEAR(date)

Example

SELECT DAYOFYEAR('2020-06-20');

The above query returns:

172