Example: Querying for the Day of the Week on Which the Specified Date Falls - Analytics Database - Teradata Vantage

SQL Date and Time Functions and Expressions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
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 October 18, 2010, which is a Monday, the following queries return the value 2 as the result since Monday is the 2nd day of the week.

SELECT td_day_of_week(CURRENT_DATE);
SELECT td_day_of_week(DATE '2010-10-18');
SELECT DAYOFWEEK(CURRENT_DATE);
SELECT DAYOFWEEK(DATE '2010-10-18');