description |
---|
Returns the day of the year (from 1 to 366) of the date or timestamp. |
- date_timestamp_expression: A
DATE
orTIMESTAMP
expression.
Examples
{% code title="DAYOFYEAR example" %}
SELECT DAYOFYEAR(DATE '2021-02-28')
-- 59
{% endcode %}
{% code title="DAYOFYEAR example" %}
SELECT DAYOFYEAR(TIMESTAMP '2021-03-15 11:43:22')
-- 74
{% endcode %}