Getting date stored as text into real date?

  • Thread starter Thread starter Ed from AZ
  • Start date Start date
E

Ed from AZ

A database query program outputs everything as a text string. One of
the fields is a date, formatted as yyyymmdd. Is there a worksheet
function that will change this to an Excel-recognized date? Or a
macro? The error checking doesn't flag this.

Ed
 
With your text date in A1, try this in B1:

=DATE(LEFT(A1,4),MID(A1,5,2),(RIGHT(A1,2))

Hope this helps.

Pete
 
Don't need a macro - Select your dates and choose Data/Text to Columns.
Click Next, Next, then choose yymmdd from the Date dropdown. Click
Finish. Format the dates as desired.
 
That worked great!!

Thanks!!
Ed


Don't need a macro - Select your dates and choose Data/Text to Columns.
Click Next, Next, then choose yymmdd from the Date dropdown. Click
Finish. Format the dates as desired.






- Show quoted text -
 
Back
Top