How to convert time difference between two times to number (hours/minutes/seconds) in Excel?
Normally, when calculating time difference with subtraction in Excel, you will get the result as hh:mm or hh:mm:ss format. For directly converting time difference to number such as hours/minutes/seconds only after calculating, methods in this article will do you a favor.
Recommended Excel Productivity Tools
Please do as follows to convert time difference to number.
Convert time difference to hours
Select a blank cell (in this case, I select C2), enter formula =(B2-A2)*24 into the Formula Bar, and press the Enter key. Then drag the Fill Handle down to get all time differences in hours format. See screenshot:
Convert time difference to minutes
For converting time difference to minutes, please use this formula =(B2-A2)*1440 . See screenshot:
Convert time difference to seconds
This formula =(B2-A2)*86400 can help you directly convert time difference to seconds format as below screenshot shown.
Note: In the above formulas. A2 contains the start time, and B2 contains the end time. You can change them as you need.
If you have already calculated the time differences as hh:mm:ss format, you can use the Convert Time utility of Kutools for Excel to quickly convert all time differences to hours, minutes or seconds with only several clicks.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.|
1. Select all time difference cells, click Kutools > Content > Convert Time > Time to Hours/Time to Minutes/Time to Seconds. See screenshot:
2. Then a Kutools for Excel dialog box pops up, click the Yes button.
Note: Click the Yes button will remove all formulas in selected cells.
Then the selected time difference will be converted to hours, minutes or seconds immediately based on your selection in step 1.
Note: For keeping formulas in selected cells, please click Kutools > Content > Convert Time > Convert Time. See screenshot:
In the Convert Time dialog box, specify a Convert Type, and then select a destination cell to save the converted results.
Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 60 days. Download the free trial now!