Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> how do you find the difference between dates
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