Getting and Setting the Time Zone in a Java Table Operator - Analytics Database - Teradata Vantage

SQL External Routine Programming

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-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
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.