google-bigquery - BigQuery - 无法解析输入字符串
问题描述
我已从 JSON 字段中提取字符串,格式如下,"2020-07-0217:39:02-04:00"
存储在名为time_string
.
当我使用以下函数时PARSE_TIMESTAMP("%Y-%m-%d%H:%M:%S%Ez", time_string)
,我收到所有行的“无法解析输入字符串”错误。
如果我直接粘贴一个日期time_string
作为解析函数的输入,我会得到一个输出。
询问:SELECT PARSE_TIMESTAMP("%Y-%m-%d%H:%M:%S%Ez", "2020-07-0217:39:02-04:00")
输出:2020-07-02 21:39:02 UTC
我知道这里有多个类似问题的帖子。通读它们,但无法弄清楚这一点。