DB2 Version 9.7 for Linux, UNIX, and Windows

DAYOFYEAR scalar function

Read syntax diagramSkip visual syntax diagram
>>-DAYOFYEAR--(--expression--)---------------------------------><

The schema is SYSFUN.

Returns the day of the year in the argument as an integer value in the range 1-366.

The argument must be a DATE, TIMESTAMP, or a valid character string representation of a date or timestamp that is not a CLOB. In a Unicode database, if a supplied argument is a graphic string (except DBCLOB), it is first converted to a character string before the function is executed.

The result of the function is INTEGER. The result can be null; if the argument is null, the result is the null value.