| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.tools -> calculating the difference of time with to_date
Hi!
I have problems with this calculate, because the correct calculus between
   12:03am
   11:52pm
-  --------
0:11 and not 23:49
what's the wrong??
[[[_Scrumble_Warrior_]]]  #icq_Amigos          11:10pm  10:58pm  0:12
[[[_Scrumble_Warrior_]]]  #amigos              11:10pm  10:58pm  0:12
[[[_Scrumble_Warrior_]]]  #icq_Amigos          12:03am  11:52pm  23:49
[[[_Scrumble_Warrior_]]]  #amigos              12:03am  11:35pm  23:31
select nick,canal,fin,inicio,abs(trunc(24*(to_date(fin,'HH12:MIam')- to_date(inicio,'HH12:MIam')),0))
       || ':'
       || abs(trunc(60*(24*(to_date(fin,'HH12:MIam')-to_date
(inicio,'HH12:MIam'))-trunc(24*(to_date(fin,'HH12:MIam')-to_date
(inicio,'HH12:MIam')),0)),0)) as "Delta T"
from chateros
Sent via Deja.com
http://www.deja.com/
Received on Thu Dec 21 2000 - 09:26:35 CST
|  |  |