Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 14:56:44
Original
1933 people have browsed it

如题 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
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template