Getting and Setting the Time Zone in a Java Table Operator - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantageā„¢

You can get or set the time zone value in a Java table operator.

To get the time zone value, do the following:

  1. Call getTime() or getTimestamp() and check that the return type is TeradataTime or TeradataTimestamp.
  2. If the return type is TeradataTime or TeradataTimestamp, call getTimeZone() on the object to get the time zone.

To set the time zone value, do the following:

  1. Create a TeradataTime or TeradataTimestamp object.
  2. Call setTimeZone() on the TeradataTime or TeradataTimestamp object, and pass the result to updateTime () or updateTimestamp() as the second parameter.
TeradataTime and TeradataTimestamp are used to get and set the time zone in Time with Time Zone and Timestamp with Time Zone values in the input or output rows. They are used only with Java table operators. For information about using Time with Time Zone and Timestamp with Time Zone as parameter and return types in a Java table operator, see SQL to Java Data Type Mapping.