

why does it handle day 0 of the first yr & mth it ‘can’ handle. PS: The one thing I haven’t been able to explain to myself for a long time. One way round this could be to add 1 day to the time as it would not affect the time displayed *but* it would mean sorting time field would go weird. Hence subtracting more then 4 hours and 5 mins from the time in the second example results in a date that is impossible for Excel, 1st Jan 1900 being the earliest date it works with. It’s just that Excel has sensed you entered a time so defaults to displaying just the time portion of the actual cell value – ie in hh:mm format. This means both 16:40 and 04:05 actually get stored as a serial number which ends up being 16:40 and 04:05 – you’ll see that if you update the cell format to dd/mm/yy hh:mm format (or other date format you might choose). With time, you are actually still dealing with dates as well. It happens sometimes that you need to track the time difference in minutes instead of hours, and in this case, the best way is to use the below formula. So when you enter this formula, first of all, it returns a decimal number for the hours, and then INT removes the fractional part and gives you completed hours. INT function returns the integer part decimal by rounding it down. This formula is just like the formula which we have used in the second method, the only difference is here we have wrapped it in INT. You can also calculate the completed hours between two times with this simple formula. And when further you multiply it by 24 (the total number of hours in a day) it converts that decimal into the number of hours and minutes. How this Formula WorksĪs I said before, Excel stores date and time in numbers, and when you deduct the end time from the start time it returns a decimal. Once you enter this formula it returns the hours in numbers and minutes (if you have them) in decimals.

Let’s suppose you have a start and end time (like below) where you need to get the difference between both.


This is one of the most common ways to get the difference between two times. So if you have a difference of 5 hours and 30 minutes it will show it as 05:00 AM. When you format that result value it shows those values as hours and minutes (starting from 00:00) instead of showing the actual difference in hours and minutes. But there is no specific function that you can use to get the difference between times values.Īs you know, a time value is a numeric value that is formatted as time but when you deduct one value from another it returns a decimal number and you need to format it again as time. In Excel, there are a lot of functions to deal with date and time. If you work with data where you have time values then the tips which I’m going to share today can be helpful for you.
