--日期转时间戳 SELECT EXTRACT(epoch FROM NOW()); SELECT EXTRACT(epoch FROM CAST('2017-12-06 00:17:10' AS TIMESTAMP)); --时间戳转日期 SELECT TO_TIMESTAMP(1512490630)