Greetings!
I am trying to figure out time difference between two columns with military times in it. Time difference should be in minutes. The table that contains these two time columns looks like this:
BEGIN_TIME END_TIME
0800 0850
0900 1015
1030 1300
1100 1430
What I would like to see is
BEGIN_TIME END_TIME MINUTES
0800 0850 50
0900 1015 75
1030 1300 150
1100 1430 210
Time overlapping does not matter. I was not able to figure out how to get time difference between these two times (END_TIME - BEGIN_TIME) in military time. So I thought converting military time to standard time would help. I figured out how to do that.
SELECT
TO_CHAR(TO_DATE(BEGIN_TIME1, ‘HH24MI’), ‘HHMI’) STARTTIME,
TO_CHAR(TO_DATE(END_TIME1, ‘HH24MI’), ‘HHMI’) ENDTIME
I am still not able to figure out how to get the time difference between these two times in minutes. Any assistance provided would be appreciated. I am using Toad 9.7 & Oracle 11g,