ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format Question (https://www.excelbanter.com/excel-discussion-misc-queries/243915-format-question.html)

Jeremy

Format Question
 
What is the best way to convert numbers to time format.

Example
173100 = 5:00:00 PM
70652 =7:06:52 AM

CM

Format Question
 
try this: assuming the number to be converted is in cell c13:

=TIME(TRUNC(C13/10000),TRUNC((C13-TRUNC(C13/10000)*10000)/100),((C13/100)-TRUNC(C13/100))*100)



"Jeremy" wrote:

What is the best way to convert numbers to time format.

Example
173100 = 5:00:00 PM
70652 =7:06:52 AM


David Biddulph[_2_]

Format Question
 
You'll have to explain the logic of your system.

If 173100 had been 5:31:00 PM instead of 5:00:00 PM we would have found it
easier to understand. In that case I would have suggested
=--TEXT(A1,"00\:00\:00") and formatting the cell accordingly.
--
David Biddulph

"Jeremy" wrote in message
...
What is the best way to convert numbers to time format.

Example
173100 = 5:00:00 PM
70652 =7:06:52 AM





All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com