Extracting specific time components from a date is essential for data analysis and reporting. You can achieve this easily using the MONTH, YEAR, or TEXT functions.
AI に任せるPrepare your data
Ensure your dates are stored in a standard date format in a column, such as column A.
Use the MONTH and YEAR functions
In a new cell, enter '=MONTH(A2)' to get the month number or '=YEAR(A2)' to get the year.
Use the TEXT function for custom formatting
To get the month name, use '=TEXT(A2, "mmmm")' or for a combined format, use '=TEXT(A2, "mmmm-yyyy")'.
Apply to the rest of the column
Double-click the fill handle at the bottom-right corner of the cell to apply the formula to the entire column.
=TEXT(A2, "mmmm yyyy")The MONTH function is designed to return the month index (1-12). Use the TEXT function with the "mmmm" format code if you need the full month name.