How do I convert a text string into a date?

G

Guest

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.
 
C

Carlos Antenna

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

Guest

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

Barb Reinhardt said:
Try using the DATE FUNCTION with LEFT,MID,RIGHT.

JJMCDD02 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top