# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  >  Extracting Month and Year from Date

## aquinn_21

There is a column for dates from which i need to get month and year accordingly into another column.

The temporary solution for me worked out to be

=CONCATENATE(MONTH(A1),"-",YEAR(A1))

A1 has a date entered.This would have been fine if it were not for the result in number format i.e. I get something like "5-2007" and I need the display to be just "May - 07"

Is there any other way for this? And also how to convert the output from Month() function to display Month Name rather than the in number.

Thanks 
Karthik

----------


## sweep

Hi,

Either use this formula:

=CHOOSE(MONTH(A1),"January","February","March","April","May","June","July","August","Spetember","October","November","December")&"-"&YEAR(A1)

or format the date as you want to display it:


Format > Cells > Number > Custom > mmmm-yyyy

----------


## daddylonglegs

Try

=TEXT(A1,"mmmm - yy")

----------


## aquinn_21

thanks a lot daddylonglegs. Worked like a Charm.
and sweep the formula you had returns an error when coming to year..thanks for the effort though

----------


## Marvin85

Hi 
this command worked for me =TEXT(A1,"mmmm - yy"). But then I need to sort it by date and it is not working. I need the dates to be in an ascending order. Any ideas?

BEst,
MArvin

----------


## hemesh

Unfortunately _your post does not comply with Rule 2 of our Forum_ RULES. *Do not post a question in the thread of another member -- start your own thread.* 

If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread. 

Old threads are often only monitored by the original participants.  New threads not only open you up to all possible participants again, they typically get faster response, too.

----------

