本文介绍了如何在oracle中找到时间戳之间的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须找到这两个时间戳之间的区别,请帮助我

I have to find the difference between these two timestamps please help me

27-FEB-12 02.11.31.910000000 AM, 27-FEB-12 02.11.49.002000000 AM

推荐答案

减去它们.结果将是INTERVAL数据类型,在这种情况下为17.092秒.

Subtract them. The result will be an INTERVAL data type representing, in this case, 17.092 seconds.

SQL> ed
Wrote file afiedt.buf

  1  select to_timestamp( '27-FEB-12 02.11.31.910000000 AM', 'DD-MON-RR HH.MI.SS.FF9 AM') -
  2         to_timestamp( '27-FEB-12 02.11.49.002000000 AM', 'DD-MON-RR HH.MI.SS.FF9 AM')
  3*   from dual
SQL> /

TO_TIMESTAMP('27-FEB-1202.11.31.910000000AM','DD-MON-RRHH.MI.SS.FF9AM')-TO_
---------------------------------------------------------------------------
-000000000 00:00:17.092000000

这篇关于如何在oracle中找到时间戳之间的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 10:48