Solved

Convert Date Text to Regular Date Format

Posted on 2011-03-01
6
211 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
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

860 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