Example: Querying the Number of Months from the Year Beginning - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Publication Date
February 2025
Publication ID
B700-4600-008K
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
ft:sourceId
dita
dita:id
jbe1714339405530

If the current date is March 15, 2011, the following query returns 3 because March 15, 2011, is in the third month of the Teradata calendar:

SELECT TD_SYSFNLIB.MONTHNUMBER_OF_YEAR(CURRENT_DATE);

The following query returns 3 because March 15, 2011, is in the third month of the ISO calendar:

SELECT TD_SYSFNLIB.MONTHNUMBER_OF_YEAR(DATE '2011-03-15', ’ISO’);