1,date转long :
当前时间转成long :
select 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