运行它
SELECT timestamp '2019-6-2 00:00 UTC'
将向我返回日期表示形式。

然后我想把它作为一个大整数来获取,
SELECT cast(timestamp '2019-6-2 00:00 UTC' as bigint)
我得到了这个错误
Query failed (#20190604_014249_16755_mru2t): line 1:8: Cannot cast timestamp with time zone to bigint
发布于 2019-06-04 09:48:33
你想要什么大的?一个合理的答案是unix时间戳:
select cast(to_unixtime(timestamp '2019-6-2 00:00 UTC') as bigint)https://stackoverflow.com/questions/56436378
复制相似问题