Share via


to_utc_timestamp 功能

適用于:核取標示為是 Databricks SQL 檢查標示為是 Databricks Runtime

以 UTC 傳回不同時區中的 expr 時間戳記。

語法

to_utc_timestamp(expr, timezone)

參數

  • expr:TIMESTAMP 運算式。
  • timezone:屬於有效時區的 STRING 運算式。

返回

時間戳記。

例子

> SELECT to_utc_timestamp('2016-08-31', 'Asia/Seoul');
 2016-08-30 15:00:00
> SELECT to_utc_timestamp( '2017-07-14 02:40:00.0', 'GMT+1');
 2017-07-14 01:40:00.0