Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Time Operations
Try:
select to_char(trunc(sysdate) +
(to_date('03:15:00', 'hh:mi:ss') -
to_date('03:00:00','hh:mi:ss')),'hh24:mi:ss') test
from dual;
This will work for a time difference of up to 23 hours, 59 minutes and 59 seconds .
HTH
James
In article <3871e86f_at_news.datacomm.ch>,
"Daniel" <fiudi @@@ hotmail com> wrote:
> Hello
>
> I'm trying to do some time calculations like:
>
> select to_date('03:15:00', 'hh:mi:ss') - to_date('03:00:00',
'hh:mi:ss')
> test
> from dual;
>
> TEST
> ---------
> .01041667
>
> The problem is to set 'TEST' back to a time (resp. date) format.
> Any suggestions?
>
> Thanks
> Dan
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Jan 04 2000 - 09:48:29 CST