Example: Querying for the Year of the Specified Date - Teradata Vantage - Analytics Database

SQL Date and Time Functions and Expressions

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
cpk1628111786971.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
pxz1544241488545
lifecycle
latest
Product Category
Teradata Vantageā„¢

If the current date is November 14, 1977, the following queries return the value 1977 as the result, which is the year of the specified date.

SELECT td_year_of_calendar(CURRENT_DATE);
SELECT td_year_of_calendar(DATE '1977-11-14');