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

Home -> Community -> Usenet -> c.d.o.tools -> how do you find the difference between dates

how do you find the difference between dates

From: Andy <andy.konopka_at_camtronics.com>
Date: Tue, 1 May 2001 08:18:15 -0500
Message-ID: <FHyH6.1393$A07.341309@homer.alpha.net>

Hello All,

Is there a date difference function in SQL to find the difference between a start date and a finish date in a table? I am looking to find out how long something took but when I do the following SQL it gives me weird results. Do I need to change the date format or use the to_date?

select real_s_date - reg_date from active_separate;

data in table

     WO_NO REG_DATE REAL_S_DA

---------- --------- ---------
         2 22-MAR-01            22-MAR-01
         3 23-MAR-01            22-MAR-01


results
REAL_S_DATE-REG_DATE


-.06862269
-.61071759

Would appreciate any help Received on Tue May 01 2001 - 08:18:15 CDT

Original text of this message

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