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

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

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