Formatting of the dates

srkj

New Member
Joined
Sep 27, 2011
Messages
13
month/date/year ----> yearmonthdate
05/15/2012 --> 20120515
4/1/12 --->20120401
6/03/12 ---> 20120603
07/05/2012 ---> 20120705

hello

I am trying to convert some dates that can exist in multiple formats into a single representation

the dates can exist in different forms as listed in column A and column B reflects the new format.

any help or tips are appreciated

thanks
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
month/date/year ----> yearmonthdate
05/15/2012 --> 20120515
4/1/12 --->20120401
6/03/12 ---> 20120603
07/05/2012 ---> 20120705

hello

I am trying to convert some dates that can exist in multiple formats into a single representation

the dates can exist in different forms as listed in column A and column B reflects the new format.
Give this formula a try...

=TEXT(A1,"yyyymmdd")
 
Upvote 0
Try:
=YEAR(A2)&TEXT(MONTH(A2),"0#")&TEXT(DAY(A2),"0#")

It does assume that Excel will recognize the cell refrenced as a date

[edit] Withdrawn - Rick &Jonmo's got the better formula. Apparently I wanted to do it the long way :)
 
Upvote 0

Forum statistics

Threads
1,216,117
Messages
6,128,935
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top