Calculation Issues

Convert d.hh:mm Text to Total Hours in Excel

Steve KSteve K Nov 18, 2026 868 views

Question details

Convert text in d.hh:mm format into a duration displayed as total hours and minutes.

Convert d.hh:mm Text to a Total-Hour Duration in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains duration text such as 2.04:37, where the number before the period represents days.
Observed behavior
The desired result is a calculated duration displayed as 52:37.
Before you start

Check that the source cell contains text in the form d.hh:mm, with a period between the day and time portions. The formula below assumes a five-character time portion such as 04:37.

Solution 1Recommended

Convert the Text with a Formula and Format It as Total Hours

Use this method to turn a day-and-time text value into a numeric Excel duration.

The formula converts the day portion to a number and adds the time portion. Excel stores the result as a number of days, which can be displayed as total hours.

1
Enter the formula

If the text is in A1, select B1 and enter =VALUE(LEFT(A1,FIND(".",A1)-1))+TIMEVALUE(MID(A1,FIND(".",A1)+1,5)).

2
Open the number format settings

Select B1 and open Format Cells, then choose the Number tab and select Custom.

3
Display total hours

Enter [h]:mm in the Type box and select OK. A value of 2.04:37 in A1 will display as 52:37 in B1.

4
Apply the formula to other rows

Drag the fill handle from B1 down alongside the remaining source values in column A.

Convert the Text with a Formula and Format It as Total Hours
Why the brackets matter: The [h] format displays accumulated hours beyond 24. A regular h:mm format displays the hour within a day instead.
Calculate durations in WPS Spreadsheets

Convert Day-and-Time Text to Total Hours in WPS Spreadsheets

Use a formula and a custom number format in WPS Spreadsheets to convert d.hh:mm text into a usable total-hour duration.

  1. 1. Open the worksheet: Open the workbook in WPS Spreadsheets and locate the duration text, for example in A1.
  2. 2. Enter the conversion formula: Select B1 and enter =VALUE(LEFT(A1,FIND(".",A1)-1))+TIMEVALUE(MID(A1,FIND(".",A1)+1,5)).
  3. 3. Set the duration format: Select B1, open Format Cells, choose Custom, and enter [h]:mm as the format.
  4. 4. Fill down: Drag the fill handle from B1 down to convert additional rows.
Display durations longer than 24 hours with [h]:mm.Open and edit Microsoft Excel XLS and XLSX files.Apply the formula to multiple rows with the fill handle.
microsoft office alternative - wps office

Frequently Asked Questions

Why does 2.04:37 become 52:37?

The day portion represents two days, or 48 hours. Adding 4 hours and 37 minutes gives a total duration of 52 hours and 37 minutes.

Why does my result show a decimal instead of hours?

Excel stores durations as fractions of days. Select the result cell, open Format Cells, and apply the custom format [h]:mm to display total hours and minutes.

Why does h:mm show 4:37 instead of 52:37?

The h:mm format shows the hour within a day. In Format Cells, change the custom format to [h]:mm to show accumulated hours.

Can I calculate with the converted duration?

Yes. The formula returns a numeric duration, so you can add or subtract it in other cells. Apply [h]:mm to the calculation result if you want to display total hours.