Convert 24-Hour Time to 12-Hour Values in Excel (Fix Noon Errors)
Question details
The user needs to convert 24-hour time values (e.g., 13:00) into 12-hour values (e.g., 1:00) using a formula, without relying on AM/PM indicators.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating and modifying time formats in a spreadsheet where specific time increments are added, requiring the results to be displayed as customized 12-hour numeric values.
- Observed behavior
- Standard subtraction formulas produce incorrect results or calculation errors around noon (from 12:01 to 12:19) or when the calculated time passes midnight.
Ensure the original time data in your cells is formatted as a valid Excel Time or Custom format, rather than plain text, so the formula can calculate the serial values correctly.
Use the IF and TIME Formula for Accurate Conversion
This method reliably subtracts 12 hours only from times at or after 13:00, keeping noon times (12:00 to 12:59) perfectly intact without negative value errors.
Excel handles times as fractional parts of a 24-hour day. Using the built-in TIME function prevents errors that occur when manually subtracting decimal equivalents like 0.5.
Click on a blank cell where you want the converted 12-hour time to appear (for example, B1).
Type the formula =IF(A1>=TIME(13,0,0),A1-TIME(12,0,0),A1) into the formula bar and press Enter.
Right-click the cell containing your new formula and select Format Cells from the context menu.
Navigate to the Custom category, type h:mm in the Type box, and click OK. This ensures 13:00 displays purely as 1:00 without any AM/PM indicator.

Handle Added Minutes and Midnight Rollovers Safely
Use this approach when you need to add specific time increments (like 45 minutes) to the original time before converting it to a 12-hour format.
Handle Time Conversions Seamlessly in WPS Spreadsheet
WPS Spreadsheet provides robust formula logic and flexible custom formatting, making complex time data conversions—like 24-hour to 12-hour math—straightforward and accurate.
- 1. Open your time data in WPS Spreadsheet: Launch WPS Office, select Spreadsheet, and open the workbook containing your 24-hour time values.
- 2. Apply the conversion formula: Click a blank cell next to your time data and enter =IF(A1>=TIME(13,0,0),A1-TIME(12,0,0),A1).
- 3. Format the output as h:mm: Right-click the result, choose Format Cells, go to Custom, input h:mm, and click OK to strip away AM/PM.
- 4. Batch convert remaining cells: Click and hold the small square at the bottom right of the cell, then drag it down to convert all other 24-hour times instantly.

Frequently Asked Questions
Why does subtracting 0.5 directly from time cause errors around 12:00 PM?
Spreadsheet software treats dates and times as serial numbers, where 1 whole day equals 1.0 and 12 hours equals 0.5. Directly subtracting 0.5 without checking if the time is strictly greater than 12:59 causes noon values (12:00 to 12:59) to either turn negative or flip incorrectly to midnight, breaking calculations.
How do I visually display 12-hour time with AM or PM without changing the cell value?
If you do not need to perform mathematical subtractions and only want to change how the 24-hour time is displayed, you do not need a formula. Just right-click the cell, select Format Cells, navigate to the Custom category, and enter the format code: h:mm AM/PM.
What is the purpose of the TIME function in this formula?
The TIME(hour, minute, second) function converts human-readable times into their exact decimal serial numbers. Using TIME(13,0,0) instead of guessing the decimal equivalent for 1:00 PM ensures your conditional formulas work perfectly across all regional settings and operating systems.




