DAYOFYEAR

Returns the day of the year as an integer, where January 1 is day 1.

Behavior Type

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)