To Change the Format of Time

Suppose that any user needs time 12 hours to 24 hours’ time format or vice versa along with AM or PM. So, here you will learn to convert the time format in Excel.

Query: We have a column time with 24 hours format of time. Our task is to change the time 24 format to a 12-hours form or vice versa.

Download Your Example Excel File

Formula to implement:

=TEXT(B5,”h:mm:ss AM/PM”)

Change 24 hour to 12 hour format of time.
Change 24 hour to 12 hour format of time.

Result: 6:16:10

It changes the “18:16:10” time in the cell B5 to 6:16:10 along with AM and PM.

Functions applicable:

Text: The Excel TEXT function allows converting a value to a specific format based on the given format codes. The function is useful to display text after inserting a given number formatting. 

Syntax

=TEXT (value, format_text)

Parameters

value – The value to format
format_text – Number formatting to apply.

Same way if you have time with 12 hours format to change 24 hours’ time form.

Formula to implement:

=TEXT(D6,”[h]:mm:ss”)

Change 12 hour to 24 hour format of time.
Change 12 hour to 24 hour format of time.

Result: 18:16:10

So, to change the format of time to 12 to 24 hours or 24 to 12 hours apply these formulas to quickly change the time format.

Please go through time value in Excel.