Time function, convert 24h to 12h or vice versa

In today’s Excel column, I will share with you how to calculate the total time in hours, minutes, seconds and change the 24h time format to 12h and vice versa using the TEXT function.

Okay, now let’s get to the main content. In addition to this article, you can see a few more articles related to the time function below:

#first. How to convert 24h format to 12h using TEXT . function

+ Step 1: First, you open the Excel file that you need to process.

ham-free-time-in-excel (1)

+ Step 2: To convert the time format from 24h to 12h, click on the cell where you need to output the value (result) => and enter the function formula as follows => and Enter to execute:

=TEXT(choose time value,”hh:mm:ss AM/PM“)

In there:

  • hh:mm:ss: Is the value of hours, minutes, and seconds respectively.
  • AM/PM: Is the time format AM morning, afternoon PM.

Applying to the example, we get the function formula: =TEXT(A3,“hh:mm:ss AM/PM”)

ham-free-time-in-excel (2)

+ Step 3: After pressing Enter, we will get the result as shown below. Now do Fill cell formula down the list to apply to the entire list.

ham-free-time-in-excel (3)

After doing this, we will get the 12h time format result.

Excel (4)

#2. How to convert 12h format to 24h using TEXT . function

With the opposite case if you need convert time from 12h to 24h format Then you apply the following function formula:

=TEXT(time value,“hh:mm:ss”)

Applying to the example, we get the following function formula: =TEXT(B3,“hh:mm:ss”)

See more:  Lesson 271: Descriptive Statistics in Excel

ham-free-time-in-excel (5)

Then you Fill the result of the formula cell down to the remaining cells and you’re done.

ham-free-time-in-excel (6)

The end result, after we are done, will look like the image below.

excel

#3. How to calculate total time hours, minutes, seconds using TEXT . function

To calculate the time from 0:00:00 to the current time, enter the following function formula => and press Enter for lookup.:

=TEXT(time value,“hh”)

Applying to the example we get the following function: =TEXT(C3,“hh”)

Excel (8)

****************************************

Similarly, with the way to calculate the total number of minutes, you also enter the following function:

=TEXT(time value, “[mm]”)

Note: To calculate the total number of minutes you add square brackets to the value mm.

Applying to the example, we get the function formula: =TEXT(C3,”[mm]”)

Excel (9)

****************************************

And with the calculation of the total number of seconds, you also apply the same as calculating the total number of minutes, you use the following function formula:

=TEXT(time value, “[ss]”)

Applying to the example we get the formula: =TEXT(C3,”[ss]”)

excel (10)

Finally, highlight 3 formula values ​​for hours, minutes, and seconds => then hold the plus sign to Fill down the entire list.

Excel (11)

And we get the final result as shown below.

Excel (12)

#4. Epilogue

Okay, so I just gave you a very detailed guide on how use TEXT function to calculate total hours, minutes, seconds and change format 24h to 12h in Exceland vice versa.

In addition, with the TEXT function, you can also calculate indices such as day, current date, percentage, fraction, or longitude, latitude and currency …

See more:  How to automatically save documents in Word?

At this point, my article would also like to pause. Hope this trick will be useful to you.

Good luck !

CTV: Luong Trung – techtipsnreview

The article achieved: 5/5 stars – (There is 1 review)

Note: Was this article helpful to you? Don’t forget to rate the article, like and share it with your friends and family!


Source: Time function, convert 24h to 12h or vice versa
– TechtipsnReview

Leave a Reply

Your email address will not be published. Required fields are marked *