Intro
Convert dates to month and year in Excel using formulas and functions, including TEXT, DATE, and YEAR, to simplify data analysis and visualization with ease.
Converting dates to month and year in Excel can be a useful skill, especially when working with large datasets that involve dates. This process can help in summarizing data by month and year, making it easier to analyze trends and patterns over time. Excel provides several ways to achieve this conversion, and we'll explore some of the most common methods.
When dealing with dates in Excel, it's essential to understand how Excel stores dates. Excel stores dates as serial numbers, starting from January 1, 1900, which is considered as day 1. This system makes it easy to perform arithmetic operations on dates. However, when you want to extract just the month and year from a date, you need to use specific functions or formatting.
Using Date Formatting
One of the simplest ways to convert a date to month and year is by changing the cell format. This method doesn't alter the underlying date value but changes how it's displayed.
- Select the cells containing the dates you want to format.
- Right-click on the selected cells and choose Format Cells.
- In the Format Cells dialog box, click on the Number tab.
- Select Custom from the Category list.
- In the Type field, enter a custom format. For example, to display the month as its full name followed by the year (e.g., January 2023), you would type
MMMM YYYY
. - Click OK to apply the format.
This method is quick and easy but keep in mind that the cell still contains the full date. If you need to use the month and year in calculations, you might need to extract them using formulas.
Using Formulas to Extract Month and Year
If you need to use the month and year in further calculations or if you want to separate them into different columns, you can use Excel formulas.
Extracting Month:
To extract the month from a date, you can use the MONTH
function.
- Assume the date is in cell A1.
- In another cell, enter the formula:
=MONTH(A1)
- This will return the month as a number (1-12).
Extracting Year:
To extract the year from a date, you can use the YEAR
function.
- Assume the date is in cell A1.
- In another cell, enter the formula:
=YEAR(A1)
- This will return the year as a four-digit number.
Combining Month and Year:
If you want to combine the month and year into a single cell, you can use the TEXT
function in combination with the MONTH
and YEAR
functions.
- Assume the date is in cell A1.
- To display the month as its abbreviation followed by the year (e.g., Jan 2023), use the formula:
=TEXT(A1,"MMM YYYY")
- To display the full month name followed by the year, use:
=TEXT(A1,"MMMM YYYY")

Using Power Query
For more complex data manipulation, including converting dates to month and year, Power Query (available in Excel 2010 and later versions) can be a powerful tool.
- Select the data range that includes your dates.
- Go to the Data tab and click on From Table/Range to load your data into Power Query.
- In the Power Query Editor, select the date column.
- Go to the Add Column tab.
- Click on Date and select either Month or Year to extract the respective part of the date.
- If you want to combine month and year, you can add a custom column using the formula:
Replace= Text.Month([Date]) & " " & Text.From([Date].[Year])
[Date]
with the name of your date column. - Load your query back into Excel.

Gallery of Excel Date Functions
Excel Date Functions Gallery










FAQs
How do I convert a date to month and year in Excel?
+You can convert a date to month and year by changing the cell format to a custom format like "MMMM YYYY" for full month name and year, or use formulas like `TEXT(A1,"MMM YYYY")` for abbreviated month and year.
What is the difference between using the MONTH and YEAR functions versus the TEXT function in Excel?
+The MONTH and YEAR functions return the month and year as numbers, while the TEXT function can format the date as a string, allowing for more flexibility in how the date is displayed, such as combining month and year.
Can I use Power Query to extract the month and year from a date in Excel?
+Yes, Power Query provides options to extract the month and year from a date column, offering a powerful way to manipulate and transform date data.
In conclusion, converting dates to month and year in Excel is a versatile skill that can enhance your data analysis capabilities. Whether you choose to use simple formatting, formulas, or the more advanced features of Power Query, Excel provides the tools you need to work efficiently with dates. By mastering these techniques, you can unlock more insights from your data and present your findings in a clearer, more compelling way. Feel free to share your experiences or ask further questions about working with dates in Excel in the comments below.