我有以下字符串:

问题描述 投票:0回答:1

FROM_ISO8601_TIMESTAMP

播放为时间戳(6)

PARSE_DATETIME

    哪种转换是哪种最佳方法?这是我要求的所需输出:
  • data: 2024-02-28 17:26:51.292534 UTC typeof: timestamp(6) with time zone
  • from_iso8601_timestamp('2024-02-28T14:26:51.292534-03:00') AT TIME ZONE 'UTC'

为您提供想要的东西:

2024-02-28 17:26:51.292000 UTC
amazon-athena trino apache-iceberg
1个回答
0
投票
timestamp(6) with time zone
,因此总共需要:

CAST(from_iso8601_timestamp('2024-02-28T14:26:51.292534-03:00') AT TIME ZONE 'UTC' AS timestamp(6) WITH TIME ZONE)

检查一种类型,做:

SELECT typeof(thing above)

    

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.