Example: Querying the Year Ending Immediately after the DATE or TIMESTAMP - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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');