Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

GET_TIMESTAMP

GET_TIMESTAMP

Returns the date/time value for a timestampWithTZ input type. The date/time returned will be in the requested time zone, which can be provided as the second argument. If the time zone value is not specified in the second argument, the function returns the timestamp part of the input timestampWithTZ value.
For example:
GET_TIMESTAMP(Timestamp with Time Zone,“+08:30”)
The first argument, timestamp with time zone has (+05:30) as the time zone value. The function returns the timestamp in the time zone specified as the second argument, (+08:30).
The output port must be date/time for GET_TIMESTAMP expressions.

Syntax

GET_TIMESTAMP (timestamp_with_timezone_value, [timezone_value])
The following table describes the arguments for this command:
Argument
Required/
Optional
Description
timestamp_with_timezone_value
Required
Must be a timestamp with time zone data type. You can enter any valid transformation expression.
timezone_value
Optional
Must be a string data type. The string must be a character string. Passes the values you want to display for time zone based on which the function can return the timestamp. You can enter any valid transformation expression. If you do not specify the time zone, the function returns the timestamp part of the first argument.

Return Value

Returns the timestamp value in time zone offset or region specified.
If the time zone value is not passed, the function returns the timestamp part of the first argument.
NULL if the input is a null value.
Example
INPUT VALUE
RETURN VALUE
'1996-01-05 10:45:00.221111111 AM America/Los_Angeles’, '+05:30'
Returns the timestamp value in time zone offset of '+05:30': ’1996-01-06 12:15:00.221111111 AM’
'1996-01-05 10:45:00.221111111 AM America/Los_Angeles’, 'GMT’
Returns the timestamp value in the ‘GMT’ time zone: ‘1996-01-05 06:45:00.221111111 PM’
'1996-01-05 10:45:00.221111111 AM America/Los_Angeles’
As the time zone value is not passed as the second input parameter, the timestamp is returned: ‘1996-01-05 10:45:00.221111111 AM’

0 COMMENTS

We’d like to hear from you!