View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default Change text to military time

=TIME(LEFT(A1,2),MID(A1,3,2),RIGHT(A1,2))

formatted as Time will do the trick

"gobonniego" wrote:

I'm trying to change a column of 6 digit numbers into military time separated
by colons. Example 180333 to 18:03:33 (hours, minutes, seconds). I've used
=(A1/100)+(((A1/100)-(A1/100))/0.6) and reformat for time and also
=VALUE(LEFT(A1,LEN(A1)-2)&":"&RIGHT(A1,2))

Neither of them transfer the 6 digit number into the correct time. Any help?