Text to date: 20010102 to ?date format

aabbasi

Board Regular
Joined
Mar 4, 2002
Messages
188
Hi:

Coudl someone please let me know how I can change the following type of text to date format:

20010102 to 01/02/2001

Thank you
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi Abbasi:

Select the cells to convert, then invoke DATA|Text_to_columns, then Next,Next, then in cColumn_Dat_Format, choose the Date Option, then select YMD, then Finish

that should do it!
 
Upvote 0
Hi Yogi and texasalym:

Thank you both of you for a quick response. Texasalym: your solution worked for me. Unfortunately, Yogi i was not able to solve with your suggestion. may be I did something wrong !
 
Upvote 0
Hey Yogi - that was cool. I did not know that would work like that. Much better way to convert.

Thanks . . . texasalynn
 
Upvote 0
aabbasi said:
Hi Yogi and texasalym:

Thank you both of you for a quick response. Texasalym: your solution worked for me. Unfortunately, Yogi i was not able to solve with your suggestion. may be I did something wrong !
Hi Aabasi:

The beauty of doing it with DATA|Text_to_columns is that no formula is needed, and the conversion can be made either in place or ported to another cell.

Now why it did not work for you -- I can not say. You have not stated whether you could get to the right tab in DATA_text_to_columns, and whether you made the right selections.

I would suggest try it again, and post back whether it works for you -- otherwise explain a little further and then let us take it from there.
 
Upvote 0
texasalynn said:
Hey Yogi - that was cool. I did not know that would work like that. Much better way to convert.

Thanks . . . texasalynn
Hi texasalynn:

Yes -- it is the prefered way -- because no formula is needed -- and of course as I mentioned to Aabasi, the conversion can be made either in place or the conversion can be posted in another cell -- especially if it is necessary to retain the original data for tracking or for audit trail.
 
Upvote 0
Hi Yogi:

Sorry for being not clear.

This is hat I did:
I selected the cell. Then went to Data- Text-to-Colum, slected Delimited
then clicked Next, again Next
under Column Format, selected Date MDY
and clicked Finish

Nothing Changed !
 
Upvote 0
I have to agree with Mudface. I tried it using MDY and nothing happened, but with YMD it works perfectly and translated todays date from 20031219 to 12/19/2003
 
Upvote 0

Forum statistics

Threads
1,215,833
Messages
6,127,157
Members
449,367
Latest member
w88mp

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