Military Time (Get and Subtract)

HomeExcel FormulasMilitary Time (Get and Subtract)

Convert Normal Time into Military Time

You can use the TEXT function to convert a normal time into military time in Excel.

In the following example, we have the time in cells A1 and A2. The first time is in AM and the second is in PM.

convert-normal-time

Now by using the text function, you can convert this time into military time and the formula would be as follows.

=TEXT(A1,”HHMM”)

military-time

In the format argument, you have the “HHMM” format which is without a colon, and which shows the time as military time.

Get Military Time using Custom Formatting

To use the custom formatting, you need to select the cell or the range of cells where you want to get the military time.

military-time-using-custom-formatting
  1. Once you select the cell, use the shortcut key Control + 1 to open the format options.
  2. Click on the Custom to go to the custom formatting option.
  3. From here, click on the input box and format that you already have there.
  4. In the end, enter “HHMM” there as a format and click OK.

🔙 Excel Formulas