dayofyear

Returns the day of the year in "date_expression" as an integer in the range 1 to 366. "Date_expression" can be a date value or a string representation of a date.

Syntax

dayofyear ( date_expression )

Example

dayofyear ( current_date )

Result

Returns the day of the year for the current date; e.g., if it was January 28, the expression would return 28.