Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Convert mm/dd/yyyy text format to date format

I imported a csv file and the date column is in text format. How do I convert it from m/d/yyyy text format to yyyy-mm-dd DATE format in Numbers v 3.1?


Thanks for any help you can give!

OS X Mavericks (10.9.2), Numbers v 3.1

Posted on Mar 25, 2014 10:37 AM

Reply
9 replies

Mar 25, 2014 11:11 AM in response to lkundert

where are you located? It worked for me in the US.



You can also do this so that the formulas are all the same:


User uploaded file

B2=SEARCH("/",A2, 1)


this is shorthand for select cell B2 and type (or copy and paste from here) the formula:

=SEARCH("/",A2, 1)


C2=SEARCH("/",A2, 1+B2)

D2=RIGHT(A2,4)&"-"&MID(A2, B2+1, C2−B2−1)&"-"&LEFT(A2,B2−1)


select B2 thru D2, copy


select column B thru D, paste

Feb 28, 2015 10:11 AM in response to James Kachan

UPDATE: I found that your formula didnt produce the correct result

User uploaded file

It changed mm/dd/yyyy to yyyy/dd/mm — rather than the desired yyyy/mm/dd


By hacking at it, I found that changing the D column formulas around fixed this.


Your original function:

D2=RIGHT(A2,4)&"-"&MID(A2, B2+1, C2−B2−1)&"-"&LEFT(A2,B2−1)


Changed:

D2 =RIGHT(A2,4)&"-"&LEFT(A2,B2−1)&"-"&+MID(A2, B2+1, C2−B2−1)


User uploaded file

Convert mm/dd/yyyy text format to date format

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.