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.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
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!