presto unixtimestamp转标准日期
用到presto两个函数 1. from_unixtime 2.format_datetime select '1566748800000' , substr ( '1566748800000' , 1 , 10 ) as a , from_unixtime ( cast ( substr ( '1566748800000' , 1 , 10 ) as int )) as b , -- 将 13 位毫秒级的 unix timestamp 截取到秒级别 format_datetime ( from_unixtime ( cast ( substr ( '1566748800000' , 1 , 10 ) as int )), 'yyyy-MM-dd' ) 转换结果 参考资料 https://prestodb.github.io/docs/current/functions/datetime.html 来源:博客园 作者: MrZhang_ 链接:https://www.cnblogs.com/MrZhangL/p/11417960.html