How to Convert HHMM Values to Time and Decimal Hours in Excel
Question details
The user needs to convert 4-digit numeric values representing hours and minutes (such as 0930) into recognizable Excel time formats, calculate decimal hours, and accurately sum the total durations.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- During data entry, times are often typed as continuous numbers without colons to save time. These numbers must later be converted for payroll, scheduling, or time-based calculations.
- Observed behavior
- Excel treats entries like 0930 and 0415 as standard integers (930 and 415) rather than time values, preventing accurate time summation and decimal hour calculations.
Ensure your numeric data does not contain decimals, and verify that the last two digits of your HHMM numbers (representing minutes) do not exceed 59 before applying the conversion formulas.
Use the TEXT Function to Convert to Time and Decimal Hours
The TEXT function is the most efficient method. It easily inserts a colon into a 3- or 4-digit number and converts it to a recognizable time value.
This approach uses the TEXT function to format the number as a string with a colon, and the double unary operator (--) to coerce that text string back into a numeric time value.
Click on an empty cell next to your HHMM value (for example, click E2 if your data is in D2).
Type the formula =--TEXT(D2,"00\:00") and press Enter. This converts the number into an Excel serial time value.
Right-click the result cell, select "Format Cells", go to the "Custom" category, and type hh:mm to display it as a standard time.
If you need decimal hours instead of a clock time, use the formula =24*TEXT(D2,"00\:00") and format the cell as General or Number.

Extract Hours and Minutes Using TIME, INT, and MOD
This mathematical method separates the hours and minutes from your number and rebuilds them into a valid time value.
Convert to Excel Time Using the DOLLARDE Function
A clever workaround utilizing a financial function to easily convert the minute fraction into decimal time.
Convert Time Data Easily with WPS Spreadsheet
WPS Office provides a fully compatible Spreadsheet tool that handles all standard Excel functions like TEXT, TIME, and DOLLARDE. You can quickly format, convert, and calculate time values without paying for expensive software.
- 1. Open your file in WPS: Launch WPS Spreadsheet and open your existing Excel workbook containing the HHMM data.
- 2. Apply the conversion formula: Click an empty cell and enter =--TEXT(D2,"00\:00") next to your numeric data.
- 3. Format and drag to fill: Press Ctrl+1 to open Format Cells, apply the "hh:mm" custom format, and drag the fill handle down to convert the entire column.

Frequently Asked Questions
Why does summing my converted time values reset after 24 hours?
Standard time formats (like hh:mm) reset to 00:00 after 24 hours because they are designed to display a time of day. To show total accumulated hours that exceed 24, you must apply the custom number format [h]:mm or [hh]:mm to your total cell.
Can I format the original cell to just look like a time instead of converting it?
Yes, you can apply a custom format like 00\:00 to the original cell so an entry of 0930 visually displays as 09:30. However, the underlying value remains the integer 930. Because of this, you still cannot use that cell for accurate time-based calculations without using formula conversion first.
How do these formulas handle 3-digit times like 930 instead of 0930?
The formulas provided automatically handle 3-digit numbers correctly. In the TEXT formula (=--TEXT(D2,"00\:00")), the format forces the number into a 4-character string with leading zeros, so 930 becomes "09:30" before being converted to a valid time.




