Link to home
Start Free TrialLog in
Avatar of pwflexner
pwflexner

asked on

Converting date format to tect

I have a column of dates in the format m/d/y, for example 6/21/2010 or 11/7/2012.  I need the dates to be in text form yyyymmdd.  Is there a simple way to do this?
Avatar of Missus Miss_Sellaneus
Missus Miss_Sellaneus
Flag of United States of America image

=YEAR(A1)&TEXT(MONTH(A1),"00")&DAY(A1)
Correction, you need the day to always be 2 digits just like the month.

=YEAR(A1)&TEXT(MONTH(A1),"00")&TEXT(DAY(A1),"00")
ASKER CERTIFIED SOLUTION
Avatar of rshq
rshq
Flag of Iran, Islamic Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Set the cells Format properties (FormatCells) to Custom>Type in "yyyyMMdd"

I just realized Excel assumes what 'mm' means between minutes and months.
Avatar of pwflexner
pwflexner

ASKER

All of the solutions were good but this one was the simplest and most elegant.  Thanks.