16.20 - Example: Returning the Current Date for INTERVAL -'09:00' HOUR TO MINUTE - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Functions, Expressions, and Predicates

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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

   SET TIME ZONE INTERVAL '01:00' HOUR TO MINUTE;
   SELECT CURRENT_DATE AT INTERVAL '09:00' HOUR TO MINUTE;

The above SELECT statement returns the current date based on the time zone displacement, INTERVAL '09:00' HOUR TO MINUTE. If the current timestamp at UTC is TIMESTAMP '2008-06-01 19:30:00.000000+00:00', the SELECT statement would return '08/06/02' as the date.

If the SELECT statement was specified without an AT clause or with an AT LOCAL clause, and the DBS Control flag TimeDateWZControl is enabled, the statement would return
'08/06/01' as the current date based on the current session time and time zone displacement, INTERVAL '01:00' HOUR TO MINUTE.

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