Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: calculating the difference of time with to_date

Re: calculating the difference of time with to_date

From: <steveee_ca_at_my-deja.com>
Date: Thu, 21 Dec 2000 15:45:17 GMT
Message-ID: <91t8ia$92k$1@nnrp1.deja.com>

Hi,

Actually, the calculation is doing what you want..the day starts at midnight and ends at 11:59:59 PM..include dates if you want what you're looking for..

Regards,

Steve

In article <91t7f2$88p$1_at_nnrp1.deja.com>,   psilvao_at_yahoo.com wrote:
> 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
> where nick like '[[[_Scrumble_Warrior_]]]'
>
> Sent via Deja.com
> http://www.deja.com/
>

Sent via Deja.com
http://www.deja.com/ Received on Thu Dec 21 2000 - 09:45:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US