Zay*_*_SE 1 sql google-bigquery
我正在尝试在 bigquery 中截断 UTC 时间。我试图从我的时间戳中删除毫秒。我不想四舍五入,只需删除毫秒。
To this: 2019-11-11 19:10:57 UTC```
I've tried truncate and date but can't seem to make it work.
Run Code Online (Sandbox Code Playgroud)
尝试以下(BigQuery 标准 SQL)
TIMESTAMP_TRUNC('2019-11-11 19:10:57.181 UTC', SECOND)
Run Code Online (Sandbox Code Playgroud)
这将产生时间戳 2019-11-11 19:10:57 UTC