to_utc_timestampfunction

Applies to:check marked yesDatabricks SQLcheck marked yesDatabricks Runtime

Returns the timestamp inexprin a different timezone as UTC.

Syntax

to_utc_timestamp(expr,timezone)

Arguments

  • expr: A TIMESTAMP expression.

  • timezone: A STRING expression that is a valid timezone.

Returns

A TIMESTAMP.

Examples

>SELECTto_utc_timestamp('2016-08-31','Asia/Seoul');2016-08-3015:00:00>SELECTto_utc_timestamp(“2017-07-14 02:40:00.0”,'GMT+1');2017-07-1401:40:00.0