当前位置: 移动技术网 > IT编程>数据库>Oracle > oracle对日期的操作讲解

oracle对日期的操作讲解

2018年12月03日  | 移动技术网IT编程  | 我要评论

--日期转毫秒值

select to_number(sysdate-to_date('1970-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss'))*24*60*60*1000 from dual;

--毫秒值转日期

select to_char((1523476222000/1000/60/60/24+to_date('1970-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss')),'yyyy-mm-dd hh24:mi:ss') from dual;

--获取当前日期

select sysdate from dual;

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网