View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default changing time format

Hi
in a separate cell enter the formula
=TIMEVALUE(LEFT(A1,2)&":"&MID(A1,3,2) & " " & RIGHT(A1,1) & "M")

--
Regards
Frank Kabel
Frankfurt, Germany


JT wrote:
I have a spreadsheet where the time is displayed as 0405P
or 1115A.

What code can I use to change the time to 04:05:00 PM or
11:15:00 AM?

Thanks for the help.