Date Format

jogrady

New Member
Joined
Dec 17, 2004
Messages
23
What is the best way to convert the following collumn into a date format such as 1-2009 (Month-Year):

200901
200807
200808
200809
200810
200811
 

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.
My solution is about the same, but it returns 1-2009 instead of 01-2009

=RIGHT(A1,2)+0&"-"&LEFT(A1,4)
 
Upvote 0
Using your posted list in A1:A6....try this:
Code:
B1: =--TEXT(A1,"0000-00-\0\1")
Use a Custom Number Format for B1: m-yyyy
and copy down through B6.

Is that something you can work with?
 
Upvote 0
Using your posted list in A1:A6....try this:
Code:
B1: =--TEXT(A1,"0000-00-\0\1")
Use a Custom Number Format for B1: m-yyyy
and copy down through B6.

Is that something you can work with?

That is nice because it turns them in to actual dates instead of text.

I will have to remember that one for myself.

:)
 
Upvote 0
Annoying that there isn't any YM or MY option in text to columns... otherwise that would be the lickety-split way to skin this cat. Thanks for reminding me how to work numeric constants into that 2nd arg in TEXT(), Ron. I'd completely forgotten that.
 
Upvote 0
Annoying that there isn't any YM or MY option in text to columns... otherwise that would be the lickety-split way to skin this cat. Thanks for reminding me how to work numeric constants into that 2nd arg in TEXT(), Ron. I'd completely forgotten that.

Yup, I'da messed with the actual date conversion, but didn't have time.

Thanks Ron for adding that bit. :)
 
Upvote 0

Forum statistics

Threads
1,216,153
Messages
6,129,176
Members
449,491
Latest member
maxim_sivakon

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