当前位置:Gxlcms > mysql > oracle中将格林威治时间转化为一般时间

oracle中将格林威治时间转化为一般时间

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

如题 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

如题 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')
||':'
||lpad(mod(trunc(b.starttime/1000),60),2,'0') as cdate

人气教程排行