Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Google Sheets Formula – Convert time from 12 to 24 hour

Not sure where I am going wrong here, but I am trying to convert times in a Google Sheet from 12-hour format, e.g. 02:15:00 pm, to 24-hour format 14:15:00. I have tried several different formulas and/or selected the format from Googles formatting time options. Numerous sites provide this simple formula in Column D =TEXT(C4,"[hh]:mm:ss") but that won’t convert.

Sheet Image

Please see the sample sheet:
https://docs.google.com/spreadsheets/d/15ae7fjKiDFW5_38nn9MOWCzptqkEaM9AcOznGnkPFzI/edit?usp=sharing

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Would really appreciate some help.

>Solution :

First convert your date/time text data to pure date/time value. Then apply any format you desire. Try-

=ArrayFormula(TEXT(TIMEVALUE(SUBSTITUTE(A3:A5,".","")),"HH:MM:SS"))

Or you can use cell formatting to display correct date/time format.

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading