Converting a Date into Month and Year in Excel
Converting a Date into Month and Year in Excel. Excel provides two methods to convert a date into a month and year format. In this tutorial, we will discuss both methods in detail.
Method 1: Using Custom Formatting to Convert Date into Month and Year
You can follow the below steps to use custom formatting:
1. Select the cell that contains the date.2 Press the Ctrl + 1 shortcut to open the Format Cells option.3. Click on the “Custom” category.4. In the “Type” input bar, enter the format to apply to the date, such as “mmm-yyyy” for Month and Year.5. Click OK to apply the format to the cell.After following these steps, the date in the cell will be converted into month and year only, as shown below:Note that the date in the formula bar is still a full date, including the day, month, and year. Only the format applied to the cell has changed.
Some commonly used formats for this method are:
mmm – for the short month name
mm – for the month number
mmmm – for the long month name
yy – for the two-digit year
yyyy – for the four-digit year
Method 2: Using the TEXT Function to Convert Date into Month and Year in a Separate Cell
If you want to have the converted date in a separate cell, you can use the TEXT function. This function allows you to extract a value from a date and then format it as per your requirement.
You can use the below formula with the TEXT function:
=TEXT(A1, “mmm-yyyy”)
In this formula, the first argument (value) specifies the date you want to convert, and the second argument (format_text) defines the desired format.
You can use the same formats as mentioned in the first method with this formula.
After using this formula, the cell will show the date in the desired month and year format.
By using these methods, you can easily convert dates into month and year formats in Excel.