17.10 - Example: Querying the Year Ending Immediately After the DATE or TIMESTAMP - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Date and Time Functions and Expressions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1211-171K
Language
English (United States)

If the current date is February 10, 2010, the following queries return 41 because February 10, 2010, is the 41st day since the beginning of the Teradata calendar year:

SELECT TD_SYSFNLIB.DAYNUMBER_OF_YEAR(CURRENT_DATE);
SELECT TD_SYSFNLIB.DAYNUMBER_OF_YEAR(DATE '2010-02-10');