Skip to main content

DAYOFYEAR

Description

Obtains the corresponding day of the year for the given date.

Syntax

DAYOFYEAR(<dt>)

Parameters

ParameterDescription
<dt>The date expression to be calculated

Return Value

Returns the day of the year corresponding to the given date.

Examples

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