Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SQL question (converting dates)
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.comReceived on Mon Feb 24 2003 - 21:32:54 CST