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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Time Operations

Re: Time Operations

From: James Lorenzen <james_lorenzen_at_allianzlife.com>
Date: Tue, 04 Jan 2000 15:48:29 GMT
Message-ID: <84t4nl$811$1@nnrp1.deja.com>


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

Original text of this message

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