How to Convert Military Time to Standard Time in Excel

📅 Jul 09, 2026 📝 Sarah Miller

Manually converting raw military time in massive Excel sheets is a tedious, error-prone struggle for busy analysts. While standard funding sources and payroll systems require highly precise, readable project hours, raw database exports often output rigid, unformatted four-digit integers like "1830". Fortunately, implementing a dynamic Excel formula grants instant reporting clarity and safeguards data integrity. The primary stipulation to keep in mind is that Excel natively calculates time as decimal fractions of a day, requiring precise text parsing. For example, using the formula =TEXT(A2,"00\:00")+0 and formatting the cell as "hh:mm AM/PM" seamlessly converts "1830" to "06:30 PM". Below, we will break down these formula variations to streamline your workflow.

How to Convert Military Time to Standard Time in Excel

Excel Formula To Convert Military Time To Standard Time

In many industries-such as healthcare, aviation, military, and logistics-the 24-hour clock (commonly known as military time) is the standard for scheduling and logging events. While military time prevents confusion between AM and PM hours, it can be difficult for general audiences or clients to read. If you import data into Excel that uses military formats (like 1430 or 0815), you will likely want to convert it to standard 12-hour time (such as 2:30 PM or 8:15 AM).

Excel does not always recognize raw 4-digit numbers as time values automatically. To make this transition seamless, you need to use specific formulas depending on how your data is formatted. This comprehensive guide covers the best Excel formulas and formatting tricks to convert military time to standard time under any circumstance.


Understanding How Excel Handles Time

Before diving into the formulas, it is important to understand how Excel processes time. In Excel, time is treated as a fractional part of a 24-hour day:

  • 1.00 represents a full 24-hour day.
  • 0.50 represents noon (12:00 PM).
  • 0.25 represents 6:00 AM.

When you type a number like 1430 into Excel, the program treats it as the whole number "one thousand four hundred thirty," not as 2:30 PM. Our primary goal with Excel formulas is to extract the hours and minutes from these digits, convert them into an Excel-recognized time decimal, and then apply standard 12-hour formatting.


Method 1: Converting Numeric Military Time (e.g., 1430 to 2:30 PM)

If your military time is stored as a standard number without colons (for example, 1430 for 2:30 PM or 915 for 9:15 AM), you can use a combination of mathematical functions-specifically INT and MOD-inside the TIME function.

The Formula:

=TIME(INT(A2/100), MOD(A2,100), 0)

How It Works:

  • INT(A2/100): This extracts the hour portion. Dividing 1430 by 100 gives 14.3. The INT function discards the decimal, leaving you with 14 (the hours).
  • MOD(A2,100): This extracts the minute portion. The MOD function returns the remainder of a division. Dividing 1430 by 100 leaves a remainder of 30 (the minutes).
  • TIME(hours, minutes, seconds): The TIME function compiles these hours and minutes (with seconds set to 0) into a standard Excel time value.

Note: After applying this formula, you may see a decimal number like 0.60416. To display this as standard time, select the cells, press Ctrl + 1, choose Time, and select the 12-hour format (e.g., 1:30 PM).


Method 2: Converting Military Time Stored as Text (e.g., "1430" with Leading Zeros)

Sometimes military time is imported as a text string, which is especially common when leading zeros are preserved (e.g., "0815" instead of 815). For text-formatted cells, you can use the LEFT and RIGHT text extraction functions.

The Formula:

=TIME(LEFT(A2,2), RIGHT(A2,2), 0)

How It Works:

  • LEFT(A2,2): Extracts the first two characters of the text string to represent the hours. For "0815", this returns 08.
  • RIGHT(A2,2): Extracts the last two characters of the text string to represent the minutes. For "0815", this returns 15.
  • TIME(...): Converts these extracted text units into a valid Excel time serial number.

Method 3: The Universal Formula for Mixed Formats

In many real-world spreadsheets, you have a mix of 3-digit numbers (like 915) and 4-digit numbers (like 1145 or 0915 as text). Using a basic LEFT formula on a 3-digit number like 915 will break because the first two digits are "91" instead of "09".

To handle both numbers and text formats seamlessly, use the TEXT function to pad all entries to four characters before extracting the hours and minutes.

The Formula:

=TIME(LEFT(TEXT(A2,"0000"),2), RIGHT(TEXT(A2,"0000"),2), 0)

Why This Is Highly Effective:

The TEXT(A2,"0000") portion of the formula acts as a stabilizer. It automatically converts any number into a 4-character text string. For example:

  • The number 830 becomes the string "0830".
  • The number 1745 becomes the string "1745".

From there, LEFT and RIGHT can cleanly extract the correct hour and minute blocks every single time, regardless of how the source data was entered.


Method 4: Converting Military Time with Colons (e.g., 14:30 to 2:30 PM)

If your dataset already contains colons (e.g., 14:30 or 08:15), Excel already recognizes these values as valid time structures. You do not need a complex formula to convert them; you only need to change their visual formatting.

Step-by-Step Formatting Guide:

  1. Select the column or range containing the 24-hour times.
  2. Right-click and select Format Cells... (or press the keyboard shortcut Ctrl + 1).
  3. In the Category list on the left, click on Time.
  4. Select the format displaying "1:30 PM" or "13:30" according to your needs.
  5. Click OK.

If you prefer to write a formula that converts a time value with colons into a static text string in the standard format, you can use the TEXT function:

=TEXT(A2, "hh:mm AM/PM")

Summary of Conversion Scenarios

Here is a quick reference table demonstrating how different formulas process various military time inputs into standard outputs:

Source Format (Cell A2) Recommended Excel Formula Raw Decimal Output Formatted Standard Time
1545 (Number) =TIME(INT(A2/100), MOD(A2,100), 0) 0.65625 3:45 PM
"0815" (Text) =TIME(LEFT(A2,2), RIGHT(A2,2), 0) 0.34375 8:15 AM
930 (Mixed/3-digit) =TIME(LEFT(TEXT(A2,"0000"),2), RIGHT(TEXT(A2,"0000"),2), 0) 0.39583 9:30 AM
18:00 (True Time) =TEXT(A2, "h:mm AM/PM") N/A (Output is text) 6:00 PM

Handling Edge Cases and Errors

When working with large databases, you are bound to run into errors and empty cells. Here is how to handle the most common issues:

1. Handling Empty Cells

If your formula references an empty cell, the TIME function will evaluate it as 00:00, returning 12:00 AM. To prevent this, wrap your conversion formula inside an IF statement to check if the cell is blank:

=IF(A2="", "", TIME(INT(A2/100), MOD(A2,100), 0))

2. Resolving "2400" or "24:00" for Midnight

Some databases represent midnight as 2400 instead of 0000. In standard time parameters, hour 24 does not exist (the 24-hour clock runs from 0 to 23). Excel's TIME function will automatically roll hour 24 over to the next day's 12:00 AM. However, if your formula throws a #VALUE! error, you can sanitize inputs using an nested IF condition:

=IF(A2=2400, TIME(0,0,0), TIME(INT(A2/100), MOD(A2,100), 0))

Conclusion

Converting military time to standard time in Excel is straightforward once you know how the data is structured. If you have clean numeric formats, using INT and MOD inside the TIME function is the most elegant solution. For text files, parsing strings with LEFT, RIGHT, and TEXT ensures compatibility across all data types. Apply these formulas to your worksheets today to make your data easily understandable for everyone.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.