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. |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 08:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com