Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default changing time format

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default changing time format

For that display, you must have a custom format of "hhmmA/P"

Just go to Format | Cells... | Number | Category: Custom | Type: "hh:mm:ss
AM/PM"

Regards

Trevor


"JT" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing time format doodle302 Excel Discussion (Misc queries) 2 January 14th 10 09:56 AM
Changing time and text format Jamie Excel Worksheet Functions 4 December 26th 07 08:46 PM
changing the format for the time shen entered as HHMM to HH:MM QD Excel Discussion (Misc queries) 2 September 5th 06 12:21 AM
Changing a cells format (Time) Keith Excel Discussion (Misc queries) 2 July 21st 06 03:51 PM
How do I stop excel from changing my ratios into time format? Qlmmb2000 Excel Discussion (Misc queries) 3 June 26th 06 05:18 PM


All times are GMT +1. The time now is 03:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"