DAYOFYEAR


The DAYOFYEAR function returns a large integer in a range of 1 to 366 that represents the day of the year, where 1 is January 1.


DAYOFYEAR.png


The expression must return one of the following built-in data types:

  • DATE
  • TIMESTAMP
  • TIMESTAMP WITH TIMEZONE
  • Valid string representation of a date or timestamp with or without a time zone
Warning

Important

The expression cannot be specified as a constant.

If the argument can be null, the result can be null; if the argument value is null, the result is the null value.

Information
Example
UNLOAD FORMAT UNLOAD
SELECT MEMBERSHIP_NUM, DAYOFYEAR(ANNIVERSARY_DATE)
       FROM REGION49.MEMBERSHIP_RECS
REORG TABLESPACE REGION49.MEMBERS7
       DISCARD FROM TABLE REGION49.MEMBERSHIP_RECS
       WHERE (DAYOFYEAR(ANNIVERSARY_DATE) > 360)


Warning

Important

Parentheses are not required when specifying a WHERE clause condition.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Utility Manager for Db2 13.1