当前位置:Gxlcms > 数据库问题 > Postgresql中时间戳与日期的相互转换(同样适用于GreenPlum)

Postgresql中时间戳与日期的相互转换(同样适用于GreenPlum)

时间:2021-07-01 10:21:17 帮助过:9人阅读

--日期转时间戳

SELECT EXTRACT(epoch FROM NOW()); SELECT EXTRACT(epoch FROM CAST(‘2017-12-06 00:17:10‘ AS TIMESTAMP));   --时间戳转日期 SELECT TO_TIMESTAMP(1512490630)   转载自:https://blog.csdn.net/binguo168/article/details/78761123

Postgresql中时间戳与日期的相互转换(同样适用于GreenPlum)

标签:ext   gre   details   时间戳   nbsp   sql   string   postgre   时间   

人气教程排行