Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Select * From MyTable
Where TO_DATE(date1,'MM/DD/RR HH24:MI')
> TO_DATE(date2,'MM/DD/RR HH24:MI');
var date1 char(14)
var date2 char(14)
exec :date1:='07/01/04 03:03'
exec :date2:='07/01/04 16:30'
col a heading "Date 1" format a20
col b heading "Date 2" format a20
col c heading "Minutes|Difference" format 99,999
col d heading "Seconds|Difference" format 99,999
select to_char(TO_DATE(:date1,'MM/DD/RR HH24:MI'),'dd-mon-yyyy hh24:mi:ss')a
,to_char(TO_DATE(:date2,'MM/DD/RR HH24:MI'),'dd-mon-yyyy hh24:mi:ss')b
,(TO_DATE(:date2,'MM/DD/RR HH24:MI')-TO_DATE(:date1,'MM/DD/RR HH24:MI'))
*(24*60)c -- For minutes
,(TO_DATE(:date2,'MM/DD/RR HH24:MI')-TO_DATE(:date1,'MM/DD/RR HH24:MI'))
*(24*60*60)d -- For seconds
from dual
/
Minutes Seconds
Date 1 Date 2 Difference Difference
-------------------- -------------------- ---------- ----------
01-jul-2004 03:03:00 01-jul-2004 16:30:00 807 48,420