oracle中将格林威治时间转化为一般时间
程序员文章站
2024-04-04 21:59:41
...
如题 Oracle to_char(trunc(b.starttime/1000/60/60/24)+TO_DATE('1970-01-01 00:00:00', 'yyyy-MM-dd hh24:mi:ss'),'yyyy-mm-dd')||' '||lpad(mod(trunc(b.starttime/1000/60/60),24),2,'0')||':'||lpad(mod(trunc(b.starttime/1000/60),60),2,'0')||':'||lp
如题 Oracleto_char( trunc(b.starttime/1000/60/60/24)+TO_DATE('1970-01-01 00:00:00', 'yyyy-MM-dd hh24:mi:ss'), 'yyyy-mm-dd') ||' ' ||lpad(mod(trunc(b.starttime/1000/60/60),24),2,'0') ||':' ||lpad(mod(trunc(b.starttime/1000/60),60),2,'0') ||':' ||lpad(mod(trunc(b.starttime/1000),60),2,'0') as cdate