例子:

1.

日期格式为年月日:20201010110833

SELECT unix_timestamp(to_date('20201010110833', 'yyyymmddhhmiss'))*1000;
 
结果:1602299313000
 
 
2.
SELECT FROM_UNIXTIME(1602312897496/1000);
 
结果:2020-10-10 14:54:57
 
 
posted on 2020-10-10 16:32  Deep-thinker  阅读(2681)  评论(0编辑  收藏  举报