Time difference in
A1 =17/07/2014 12:47:46 PM -date
A2 =12:10-Varchar
A3 =17/07/2014 10:53:34 AM -date
1)a1-a2(hours,min) = 0hrs37mins
2)a1-a3(hours,min) = 1hrs54mins
thanks
What I have tried:
(TO_DATE(to_CHAR(a1,'hh24:mi'),'HH24:MI') - TO_DATE(to_CHAR(a2,'hh24:mi'),'HH24:MI'))*24 as OBhour,
(TO_DATE(to_CHAR(a1,'hh24:mi'),'HH24:MI') - TO_DATE(to_CHAR(a2,'hh24:mi'),'HH24:MI'))* 24 * 60 as OBmin
----output ----
for
1)0hrs 37mins
2)1.54hrs 114mins