When I format a cell in Excel to HH:MM:SS on selecting that cell it's show in 12:50:45 AM. I need it to display 00:50:45.

migrated from stackoverflow.com May 15 '13 at 11:29

This question came from our site for professional and enthusiast programmers.

  • 2
    You do know you can select time and just select the 24 hour format? – CustomX May 15 '13 at 8:34
  • Do you mean that it displays as 12:50:45 AM in the cell itself or the formula bar? Assuming the former then if the format is HH:MM:SS and it displays in a different format that would indicate that you have a text value (which won't be changed by formatting) - if data is in cell A1 what do you get with this formula in B1 =ISNUMBER(A1)? FALSE indicates text – barry houdini May 15 '13 at 9:00

Use can just add a custom format of:


Or use a formula like so:


The time display format in Excel is set to 24 hours, but selecting the cell to edit the time insisted on 12 hour format during edit. Fix: In windows7 control panel, region and Language, Formats, Additional Settings, Time.. set Long Time to HH:mm:ss ... editing is now 24 hour format. ~ This is a windows setting, so obviously changes other program formats

  • You can certainly change the format of a cell in Excel without changing Windows settings. – Ryan Jul 23 '15 at 22:16
  • 1
    This is the only one solution that worked for me, because I want the 24hs format in the formula bar in every excel sheet without applying any format. Thanks. – Gustavo Aug 25 '15 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy