Google-Bigquery
Google Big Query 時區無效:+0000
得到錯誤
Query Failed Error: Invalid time zone: +0000
有沒有辦法忽略時區或將所有內容預設為 UCT 這是我的條件
WHERE TIMESTAMP(FORMAT_TIMESTAMP("%Y-%m-%d %H:%M:%E6S%z", PARSE_TIMESTAMP("%Y%m%d", date )),"UCT") = TIMESTAMP('2018-03-05 00:00',"UCT")
date
列是這種格式的字元串 20180307
修復是從
FORMAT_TIMESTAMP
TIMESTAMP(FORMAT_TIMESTAMP("%Y-%m-%d", PARSE_TIMESTAMP("%Y%m%d", ga.date )))
您正在指定
UCT
,一個無效的時區,因為它是拼寫錯誤。您要查找的時區是UTC
.不正確:
... TIMESTAMP('2018-03-05 00:00',"UCT")
正確的:
... TIMESTAMP('2018-03-05 00:00',"UTC")