新博客http://www.cnblogs.com/zhjh256 欢迎访问
分类:
2009-11-03 19:10:46
oracle日期字段相减要求结果为天数到秒数可以使用day to second转换。
select sysdate,sysdate-to_date('2009-11-03 19:02:30','yyyy-mm-dd hh24:mi:ss'),(sysdate-to_date('2009-11-03 19:02:30','yyyy-mm-dd hh24:mi:ss')) day to second from test1;
1 2009-11-3 19:12:46 0.00712962962962963 +00 00:10:16.000000
2 2009-11-3 19:12:46 0.00712962962962963 +00 00:10:16.000000
3 2009-11-3 19:12:46 0.00712962962962963 +00 00:10:16.000000
4 2009-11-3 19:12:46 0.00712962962962963 +00 00:10:16.000000