Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JJMCDD02
 
Posts: n/a
Default How do I convert a text string into a date?

I am downloading a .CSV file which includes date info, stored as text (form
is: yyyymmdd120000[0:GMT]), and I want to convert it to a date recognized by
Excel. P.S. I don't mind chopping off the '120000[0:GMT]' string by using
the REPLACE command, but converting the remaining yyyymmdd string has got me
stumped! Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Carlos Antenna
 
Posts: n/a
Default How do I convert a text string into a date?

With your date string in a1.
=DATE(VALUE(LEFT(A1,4)),VALUE(MID(A1,5,2)),VALUE(R IGHT(A1,2)))

"JJMCDD02" wrote in message
...
I am downloading a .CSV file which includes date info, stored as text (form
is: yyyymmdd120000[0:GMT]), and I want to convert it to a date recognized
by
Excel. P.S. I don't mind chopping off the '120000[0:GMT]' string by using
the REPLACE command, but converting the remaining yyyymmdd string has got
me
stumped! Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barb Reinhardt
 
Posts: n/a
Default How do I convert a text string into a date?

Try using the DATE FUNCTION with LEFT,MID,RIGHT.

"JJMCDD02" wrote in message
...
I am downloading a .CSV file which includes date info, stored as text (form
is: yyyymmdd120000[0:GMT]), and I want to convert it to a date recognized
by
Excel. P.S. I don't mind chopping off the '120000[0:GMT]' string by using
the REPLACE command, but converting the remaining yyyymmdd string has got
me
stumped! Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default How do I convert a text string into a date?

try:

=DATE(--LEFT(A1,4),--MID(A1,5,2),--MID(A1,7,2))
--
Gary''s Student


"JJMCDD02" wrote:

I am downloading a .CSV file which includes date info, stored as text (form
is: yyyymmdd120000[0:GMT]), and I want to convert it to a date recognized by
Excel. P.S. I don't mind chopping off the '120000[0:GMT]' string by using
the REPLACE command, but converting the remaining yyyymmdd string has got me
stumped! Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JJMCDD02
 
Posts: n/a
Default How do I convert a text string into a date?

Thank you Carlos, Barb and Gary''s Student. Your solution worked and you
will save me a lot of time!

"Barb Reinhardt" wrote:

Try using the DATE FUNCTION with LEFT,MID,RIGHT.

"JJMCDD02" wrote in message
...
I am downloading a .CSV file which includes date info, stored as text (form
is: yyyymmdd120000[0:GMT]), and I want to convert it to a date recognized
by
Excel. P.S. I don't mind chopping off the '120000[0:GMT]' string by using
the REPLACE command, but converting the remaining yyyymmdd string has got
me
stumped! Thanks.




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
pasting data from a website changes text to date stebro Excel Discussion (Misc queries) 8 August 12th 06 08:39 PM
Convert Text Entry to Date Format User Excel Discussion (Misc queries) 1 November 16th 05 08:40 PM
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM
Auto convert an alphanumeric string (CIS9638S) to numbers only? Gary L Brown Excel Worksheet Functions 1 September 7th 05 01:17 AM
Macro to convert text to date Nortos Excel Worksheet Functions 2 May 11th 05 10:42 AM


All times are GMT +1. The time now is 07:48 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"