当前位置:Gxlcms > 数据库问题 > oracle 中时间类型 date 与 long 互转

oracle 中时间类型 date 与 long 互转

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

sysdate, (sysdate-to_date(1970-01-01 08:00:00,yyyy-mm-dd hh24:mi:ss))* 24*60*60*1000 current_milli from dual;

2、long转date:

select to_date(1970-01-01 08:00:00,yyyy-mm-dd hh24:mi:ss) + 1241450728000/1000/24/60/60 from dual

其中为什么是 1970-01-01 08:00:00  而不是 1970-01-01 00:00:00是因为我们是东八区呀。

 

oracle 中时间类型 date 与 long 互转

标签:htm   转行   integer   为什么   项目   www.   格式   sel   long   

人气教程排行