Format Question

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

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

Example
173100 = 5:00:00 PM
70652 =7:06:52 AM
 
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)
 
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.
 
Back
Top