Solved

Convert Date Text to Regular Date Format

Posted on 2011-03-01
6
217 Views
Last Modified: 2012-05-11
Hello:

I have a spreasheet that has text dates in Column A. I want to convert the dates so they look like this 11/13/2009, 12/07/2009, etc...

NOV 13 2009
DEC  7,2009
NOV 24,2009
DEC 14,2009
OCT  8,2009
OCT 21,2009
NOV  6,2009

I tried using this formula in Column B
 =DATEVALUE(MID(A1,4,2)&"/"&MID(A1,1,3)&"/"&MID(A1,7,4))
but I get the #Value Error.

Dan
0
Comment
Question by:RecipeDan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 35009807
You get the error because at the end of your formula you need to change the 4 by a 5, like this:

=DATEVALUE(MID(A1,4,2)&"/"&MID(A1,1,3)&"/"&MID(A1,7,5))

jppinto
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35009816
But your formula doesn't work for the rest of the rows...just for row 1.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35009868
I think you have some double spaces so that throws the formula out, try this version

=DATEVALUE(MID(A1,5,2)&"/"&LEFT(A1,3)&"/"&RIGHT(A1,4))

regards, barry
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 50

Accepted Solution

by:
barry houdini earned 400 total points
ID: 35009931
I expect my suggestion above to work, but when I copied your dates from the board some of the characters are CHAR(160)s rather than spaces. I assume that's just Experts Exchange converting the data but if those are in your original data you might need this version

=DATEVALUE(SUBSTITUTE(LEFT(RIGHT(A1,7),2),CHAR(160),"")&"/"&LEFT(A1,3)&"/"&RIGHT(A1,4))

regards, barry
0
 
LVL 33

Assisted Solution

by:jppinto
jppinto earned 100 total points
ID: 35009935
I tryed with this:

=DATEVALUE(MID(A1,FIND(" ",A1,1),3) & "/" & LEFT(A1,3) &"/" & RIGHT(A1,4))

It works on most of the values you presented. Are the double spaces for real or are they just a typo?
0
 
LVL 1

Author Closing Comment

by:RecipeDan
ID: 35010286
Thanks both of you for your help. The double spaces are real. It was a spreadsheet that was given to me.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question