ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I convert a text string into a date? (https://www.excelbanter.com/excel-worksheet-functions/57227-how-do-i-convert-text-string-into-date.html)

JJMCDD02

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.

Carlos Antenna

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.




Barb Reinhardt

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.




Gary''s Student

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.


JJMCDD02

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