Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Hillheader
 
Posts: n/a
Default Convert Text to time value


Hi

I have a text value HH:MM:SS a/p.m. (eg 7:02:43 a.m. or 12:18:18 p.m.)
and I need to convert this to a HH:MM:SS value in the 24 hour format to
allow easier sorting.

Can anyone help with the syntax please?

Cheers


--
Hillheader
------------------------------------------------------------------------
Hillheader's Profile: http://www.excelforum.com/member.php...o&userid=30644
View this thread: http://www.excelforum.com/showthread...hreadid=518384

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Convert Text to time value

With your sample time in cell A1, I got this formula to generate
something appropriate:
=TEXT(HOUR(A1),"00")&TEXT(MINUTE(A1),"00")

....where the time in A1 is an Excel-readable time format. Does that
get you close?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Hillheader
 
Posts: n/a
Default Convert Text to time value


Dave

Thanks for taking the time to reply.

In searching further I actually found an even quicker way. If I simply
replace the "a.m." with "AM" and the "p.m." with "PM" it changes the
structure of the cell so that formatting the column now does the
convertion for me.

Again thanks for the reply. Much appreciated


--
Hillheader
------------------------------------------------------------------------
Hillheader's Profile: http://www.excelforum.com/member.php...o&userid=30644
View this thread: http://www.excelforum.com/showthread...hreadid=518384

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
How to convert DATE and TIME to text ice_pack Excel Worksheet Functions 3 August 15th 05 10:30 AM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM
How to convert Numbers to text Calif_guy Excel Worksheet Functions 1 November 12th 04 05:12 AM


All times are GMT +1. The time now is 05:42 AM.

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

About Us

"It's about Microsoft Excel"