Example: Querying for the Number of Days from the Beginning of the Year - 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 the value 41 as the result since February 10, 2010 is the 41st day from the beginning of the year.

SELECT td_day_of_year(CURRENT_DATE);
SELECT td_day_of_year(DATE '2010-02-10');