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

SQL question (converting dates)

From: dbuckingham <member8912_at_dbforums.com>
Date: Tue, 25 Feb 2003 03:32:54 +0000
Message-ID: <2570355.1046143974@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 - 21:32:54 CST

Original text of this message

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