[Solved] Calculate difference between two times in Java [closed]
Have you heard of carryover? If diff value is <0, add 60 and subtract 1 from next higher value. From 7 50 25 to 14 25 12:hour = 14 – 7 = 7minute = 25 – 50 = -25second = 12 – 25 = -13 So add 60 seconds, and subtract 1 minute:second = -13 … Read more