17.10 - Example - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

In this example, the current timestamp is:

            Current TimeStamp(6)
--------------------------------
2010-03-09 19:23:27.620000+00:00

The following statement converts the TIME value '08:30:00+04:00' to a TIMESTAMP value, where the time zone displacement is based on the time zone string, 'America Pacific'.

SELECT CAST(TIME '08:30:00+04:00' AS TIMESTAMP(0)
   AT 'America Pacific');

The result of the query is:

     08:30:00+04:00
-------------------
2010-03-10 04:30:00