我有一个列,它的时间戳存储在epoch中。我需要从纪元时间戳中获取日期。例如,对于epoch = 1552942715,我需要将日期取为1552867200。如何才能做到这一点?
发布于 2019-12-12 19:43:54
create table test (epoch text NULL);Create table sample,其中列为text数据类型。
select (epoch::int)::TIMESTAMPTZ from test;如果列的类型为int或任何其他数字,则将其强制转换为timestampz
https://stackoverflow.com/questions/55227462
复制相似问题