#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default convert text to date

I have a text column 02/21/08 2315

I want to convert this to an actual date/time column keeping in military
format.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default convert text to date

=DATEVALUE(LEFT(A1,FIND(" ",A1)))+TIMEVALUE(LEFT(RIGHT(A1,LEN(A1)-FIND(" ",A1)),2)&":"&RIGHT(RIGHT(A1,LEN(A1)-FIND(" ",A1)),2))

Format Custom as mm/dd/yy hhmm

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"samuel" wrote in message ...
|I have a text column 02/21/08 2315
|
| I want to convert this to an actual date/time column keeping in military
| format.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default convert text to date

Put this formula in an unused column starting in the same row as your
topmost "text date"...

=--(LEFT(A1,11)&":"&RIGHT(A1,2))

adjusting the two A1 references to your topmost "text date" cell address,
then copy the formula down. While those cells are still selected, press
Ctrl+C, then click in your topmost "text date" cell and click
Edit/PasteSpecial from Excel's menu bar, select the Value option from the
Paste section and click the OK button. Press Esc to clear the copy
selection, select the row you just pasted over (the one that had your "text
dates" in it originally), and Custom Format the Cells with this...

mm/dd/yy hhmm

You will now have real dates that are formatted to look like the original
"text dates".

--
Rick (MVP - Excel)


"samuel" wrote in message
...
I have a text column 02/21/08 2315

I want to convert this to an actual date/time column keeping in military
format.


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
convert a text date to a true date JR Hester Excel Discussion (Misc queries) 20 November 15th 07 07:15 PM
how do i convert text to date (mm/yy text to mm/dd/yyyy date)? lindsey Excel Discussion (Misc queries) 1 July 27th 07 10:05 PM
Help: How do I convert a text date into a real date format japorms Excel Worksheet Functions 4 August 2nd 06 06:36 PM
Convert a Date to Text? Dave76Mizzou Excel Worksheet Functions 1 March 9th 06 01:32 AM
How to convert date to text galsaba Excel Discussion (Misc queries) 2 May 22nd 05 08:31 PM


All times are GMT +1. The time now is 08:33 PM.

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"