The math is not that simple because the measurement of hours and minutes is not like adding dollars and cents. Instead of being a decimal number system in which one counts from 0 to 9 or the highest digit and then the 10's column starts at 10 and counts to 99 and then 100's start at 100 on goes to 999. Time is measured and computed differently. The seconds range from 0 to 59 and then the minutes is incremented and the seconds start again at 0. Minutes go from 0 to 59 and then the hour is incremented and the minutes start over at 0. So if you want to compute hours and minutes one needs to convert the unit of measurements to a common unit. Like converting the hours to minutes and then add the minutes for the starting time and then doing that for the ending time. Now one can compute the elapsed minutes from the starting time to the ending time in minutes. If you want the result in hours and minutes then you have to convert the time to whole hours and minutes less than the whole hours.
So if one starts Monday at 0600 and ends at 1400 Monday, the start value is 6 hours * 6o minutes or 360 minutes plus 0 minutes. The ending value is 14 hours * 60 minutes or 840 minutes and 0 minutes. The difference in minutes is 840 - 360 or 480 minutes or 8 hours and 0 minutes.
For your second example. The start time of 2200 is 22 hours * 60 minutes plus 0 minutes, or 1320 minutes. The end time is 6 hours * 60 minutes plus 0 minutes or 360 plus 24 hours * 60 (1440 minutes) to adjust for the number of days since the starting day or 1800 minutes. The difference between 1800 minutes and 1320 minutes is 480 minutes or 8 hours. For check of the result, 2 hours from 2200 to 2400 and 6 hours from 0000 (2400) to 0600 totals to 8 hours.