Home  >  Article  >  Database  >  oracle中将格林威治时间转化为一般时间

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

WBOY
WBOYOriginal
2016-06-07 14:56:441932browse

如题 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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn