【发布时间】:2021-12-16 21:21:14
【问题描述】:
在 Flink SQL v1.13 中如何将带有 TZ 的 DateTime 转换为 Timestamp(3)?
TO_TIMESTAMP('2021-12-16T20:29:37Z', 'yyyy-MM-dd HH:mm:ss') //returns NULL
TO_TIMESTAMP('2021-12-16 20:29:37', 'yyyy-MM-dd HH:mm:ss') //returns 2021-12-16T20:29:37
TO_TIMESTAMP('2021-12-16T20:29:37', 'yyyy-MM-dd HH:mm:ss') //returns NULL, which is silly because this was the result from the 2nd example
它不接受T and Z,但是“干净”日期的转换结果具有T。但是如果我尝试反向操作,它会返回 null。
【问题讨论】: