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: SQL question (converting dates)

Re: SQL question (converting dates)

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.com>
Date: Tue, 25 Feb 2003 04:58:48 GMT
Message-ID: <cKC6a.226575$iG3.26976@sccrnsc02>


The difference is the days and fraction of a day. So just multiply the result by the number of seconds in a day to get how many seconds the difference is.
Jim
"dbuckingham" <member8912_at_dbforums.com> wrote in message news:2570355.1046143974_at_dbforums.com...
>
> Hoping that someone can answer this easily.
>
> I have a procedure set up where sysdate is captured into a variable at
> the beginning of the procedure and also at the end. I then wish to
> subtract the two values to get the total duration of the job.
> However, sysdate is of type dd/mm/yyyy 00:00:00 AM/PM and if you try to
> do just the simple subtraction, then you exponential decimal number as a
> result. Basically I wish to have the final answer in the format 00:00:00
> disregarding the rest of the default formatting.
>
> Does anyone know any SQL commands / conversions that I could use
> to do this?
>
> to_char, to_? type conversions etc.....
>
> Hope someone can help out.
>
> Thanks in Advance.
>
> --
> Posted via http://dbforums.com
Received on Mon Feb 24 2003 - 22:58:48 CST

Original text of this message

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