Example: Returning the Current Date for INTERVAL -'05:45' HOUR TO MINUTE - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example assumes that the default format for DATE values is 'yy/mm/dd'. Consider the following statements:

SET TIME ZONE INTERVAL '10:00' HOUR TO MINUTE;
SELECT CURRENT_DATE AT '05:45';
SELECT CURRENT_DATE AT 5.75;

The preceding SELECT statements return the current date based on the time zone displacement, INTERVAL '05:45' HOUR TO MINUTE. If the current timestamp at UTC is TIMESTAMP '2008-06-01 17:30:00.000000+00:00', the SELECT statements return '08/06/01' as the date.

If the SELECT statement has no AT clause or has an AT LOCAL clause, the statement returns '08/06/02' as the current date based on the current session time and time zone displacement, INTERVAL '10:00' HOUR TO MINUTE.

The date returned is not adjusted to account for the start or end of daylight saving time.