DAYOFYEAR
Returns the day of the year as an integer, where January 1 is day 1.
Behavior Type
- Immutable if the
specified date is a
TIMESTAMP
,DATE
, orVARCHAR
- Stable if the specified date is a
TIMESTAMPTZ
Syntax
DAYOFYEAR ( date )
Parameters
date |
The date to process, one of the following data types: |
Example
=> SELECT DAYOFYEAR (TIMESTAMP 'SEPT 22,2011 12:34'); DAYOFYEAR ----------- 265 (1 row)