Convert Number (YYMMDD) to the actual date indicated.

robione

New Member
Joined
Feb 21, 2009
Messages
15
Down loading data I receive dates as a number that indicates YYMMDD (ex. 130603 is 03 JUN 13). Is there an easy way to convert these number strings to the actual date indicated other than typing it in?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Works like a charm! Thanks!
If that works correctly for you (all years are considered to be in the 2000's), then this shorter, single function call formula should also work for you...

=0+TEXT(A1,"2000\/00\/00")

Edit Note: If you need to be able to preserve dates before the year 2000, you can use this...

=0+TEXT(A1,19+(LEFT(A1,2)<30)&"00\/00\/00")

Just change the highlighted number to the 'breakpoint" year between the centuries.
 
Last edited:
Upvote 0
Is this the same: =date(2000+left(a1,2),mid(a1,3,2),right(a1,2)) ??

No. If you don't add 0 to your MID and RIGHT functions, you're returning a text value, rather than a number. Your best bet is to go with Rick's suggestion, which is much neater than mine.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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