Convert timestamp to UTC

Supported in: Batch, Streaming

Converts a timestamp to UTC based on a given time zone.

Expression categories: Datetime

Declared arguments

  • Time zone - Time zone that the current timestamp is recorded in.
    TimeZone
  • Timestamp - Timestamp column.
    Expression<Timestamp>

Output type: Timestamp

Examples

Example 1: Base case

Argument values:

  • Time zone: Australia/Sydney
  • Timestamp: 2020-04-28T10:09:00Z

Output: 2020-04-28T00:09:00Z


Example 2: Base case

Argument values:

  • Time zone: EST
  • Timestamp: 2020-04-28T10:09:00Z

Output: 2020-04-28T15:09:00Z


Example 3: Base case

Argument values:

  • Time zone: UTC
  • Timestamp: 2020-04-28T10:09:00Z

Output: 2020-04-28T10:09:00Z


Example 4: Null case

Argument values:

  • Time zone: UTC
  • Timestamp: null

Output: null