PERIOD(TIMESTAMP WITH TIMEZONE) |Teradata Preprocessor2 for Embedded SQL (PP2) - PERIOD(TIMESTAMP WITH TIMEZONE) - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Preprocessor2
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2023-11-20
dita:mapPath
nyr1691484085721.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
xfi1470440464166
Product Category
Teradata Tools and Utilities

This period datatype is similar to PERIOD(TIMESTAMP), with the addition of a time zone.

Only character host variable formats are supported. Two TIMESTAMP WITH TIMEZONE members, each with the format are returned, as shown in the following example:

Field Displacement Length Description
Seconds 0 4 This integer represents the number of seconds as a scaled decimal. For example, 12.56 seconds is returned as 12560000.
Year 4 2 This integer represents the year value.
Month 6 1 This integer represents the month value.
Day 7 1 This integer represents the day of the month.
Hours 8 1 This integer represents the number of hours.
Minutes 9 1 This integer represents the number of minutes.
Timezone Hour 10 1 This integer represents the hours portion of the time zone displacement, and whether the displacement is + or -. A value of 16 represents 0 hours. A value less than 16 represents a negative time zone displacement for the specified hours. For example, if the value is 10, the time zone is displaced by -10 hours. If the value is greater than 16, it specifies a positive time zone displacement of (Time Zone Hour – 16) hours. For example, a value of 20 implies a +4 hour displacement.
Timezone Minute 11 1 This byte represents the minutes portion of the time zone displacement.

The total length of the output is 24 bytes.

PERIOD(TIME), PERIOD(TIME WITH TIMEZONE), and PERIOD(TIMESTAMP) describe the format of what is returned from the database server when using SELECT.