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 Arithmetic

Re: TIME Arithmetic

From: James Lorenzen <lorenzen_at_yuck.net>
Date: Tue, 20 Oct 1998 09:58:34 -0500
Message-ID: <lorenzen-ya02408000R2010980958340001@news.visi.com>


The short answer is yes. Oracle's date type stores time to the seconds. In your example below, if v_start and v_end are both date data types and v_lapse is a number, v_lapse will be the elapsed time in days. Muliply by 86,400 to get the seconds, or use the to_date function to to get the elapse time formated.

HTH
   James

In article <362C8FDD.AB066676_at_rl.af.mil>, Vinnie <salernov_at_rl.af.mil> wrote:

>Can you subtract one time from another?
>
>EX.
>
>v_start := SYSDATE;
>v_end := v_stop_time;
>
>v_lapse := v_end - v_start
>
>Thanks
>Vinnie
>Litton/PRC

--

lorenzen_at_yuck.net             | Life is complex; it has
                              |   real and imaginary parts
Received on Tue Oct 20 1998 - 09:58:34 CDT

Original text of this message

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