Back to Starrocks

dayofyear

docs/en/sql-reference/sql-functions/date-time-functions/dayofyear.md

4.1.0470 B
Original Source

dayofyear

Returns the day of the year for a given date.

The date parameter must be of the DATE or DATETIME type.

Syntax

Haskell
INT DAYOFYEAR(DATETIME|DATE date)

Examples

Plain
MySQL > select dayofyear('2007-02-03 00:00:00');
+----------------------------------+
| dayofyear('2007-02-03 00:00:00') |
+----------------------------------+
|                               34 |
+----------------------------------+

keyword

DAYOFYEAR