Convert Four-Digit Entries to Times in Excel
Question details
Convert four-digit entries such as 0745 into actual time values that display as 07:45.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains hour-and-minute digits that need to be used and displayed as times.
- Observed behavior
- Excel treats an entry such as 0745 as a number, so applying a time format alone may display 00:00.
Check that the entries represent valid 24-hour times, with hours from 00 to 23 and minutes from 00 to 59. If Excel removed a leading zero, the formula can still convert a numeric entry such as 745 to 07:45.
Convert the digits with a TIME formula
Use this method to turn four-digit entries into real Excel time values that can be used in calculations.
If the entry is in A1, select an empty cell and enter =TIME(LEFT(TEXT(A1,"0000"),2),RIGHT(TEXT(A1,"0000"),2),0).
Right-click the formula cell, select Format Cells, and choose Custom. Enter hh:mm in the Type box and select OK.
Drag the formula cell's fill handle down alongside the remaining entries. Excel adjusts the cell reference for each row.

Convert Four-Digit Times in WPS Spreadsheets
Use a TIME formula in WPS Spreadsheets to convert hour-and-minute digits into real time values, then apply a custom time format.
- 1. Open the spreadsheet: Open WPS Spreadsheets and select File > Open to load your workbook.
- 2. Convert the entry: In an empty cell, enter =TIME(LEFT(TEXT(A1,"0000"),2),RIGHT(TEXT(A1,"0000"),2),0), replacing A1 with the source cell if needed.
- 3. Set the display format: Right-click the result, select Format Cells, choose Custom, and enter hh:mm as the format.
- 4. Fill the formula down: Drag the result cell's fill handle down to convert additional rows.

Frequently Asked Questions
Why does formatting 0745 as a time show 00:00?
Excel may store 0745 as the number 745, not as a time. A time format changes only the display, so use the TIME formula to convert the digits first.
Will the formula work if Excel removes the leading zero?
Yes. The TEXT(A1,"0000") part treats a numeric value such as 745 as four digits, allowing the formula to convert it to 07:45.
How do I display 7:45 instead of 07:45?
Right-click the converted result, select Format Cells > Custom, and enter h:mm instead of hh:mm.
Can I use the converted values in time calculations?
Yes. The TIME formula returns an actual Excel time value, so you can use the result in calculations such as subtracting a start time from an end time.




