Forum Discussion
KymberliMDA
Jun 14, 2023Copper Contributor
Converting numbers in decimal to hours & minutes
How can I convert the numbers I have with 2 decimal places to hours:minutes?
KymberliMDA
Jun 15, 2023Copper Contributor
mtarler The number now just a number with 2 decimal places
mtarler
Jun 15, 2023Silver Contributor
as noted above you need to do either:
=FORMAT( A1/24, "HH:MM") or =A1/24 and change the cell formatting to show time.
the first option (FORMAT(..)) will convert it to text string (i.e. you can add or do value comparisons)
the second converts the value but then you need to go to HOME -> Cell Format go to more and then in the pop up select time and then the time format you want.
=FORMAT( A1/24, "HH:MM") or =A1/24 and change the cell formatting to show time.
the first option (FORMAT(..)) will convert it to text string (i.e. you can add or do value comparisons)
the second converts the value but then you need to go to HOME -> Cell Format go to more and then in the pop up select time and then the time format you want.
- pippo02Apr 15, 2024Copper ContributorBTW if I use FORMAT() I get #NAME error (excel version 16.8, Office LTSC Standard for Mac 2021 on Macos)
- HansVogelaarApr 15, 2024MVP
Try =A1/24 and format the result as time or =TEXT(A1/24, "hh:mm")
- pippo02Apr 15, 2024Copper Contributor
mtarler I have tried what you say.
In MHO It does not work.
BTW I still cannot understand why the TIME formats seem not to do what I would expect.
Almost all other formats are reasonable.
If I have a number that is 2.38 and I select a TIME format I should NOT get
09:07:12 or 57:07:12 or 57:07 (depending on the specific format selected)