How to Use MONTH Function in Excel: Extract Month from Date
Use the
MONTH function in Excel to get the month number (1-12) from a date. Enter =MONTH(date) where date is a valid date cell or date value.Syntax
The MONTH function extracts the month number from a date.
- date: A valid Excel date or a cell reference containing a date.
excel
=MONTH(date)
Example
This example shows how to extract the month number from a date in cell A1. If A1 contains 2024-06-15, the formula returns 6.
excel
=MONTH(A1)
Output
6
Common Pitfalls
Common mistakes include:
- Using text that looks like a date but is not recognized as a date by Excel.
- Passing a date as text without converting it to a date format.
- Forgetting that
MONTHreturns only the month number, not the month name.
Example of wrong and right usage:
excel
Wrong: =MONTH("June 15, 2024") // May return error if text not recognized as date Right: =MONTH(DATE(2024,6,15)) // Returns 6
Quick Reference
| Function | Description | Example | Output |
|---|---|---|---|
| MONTH(date) | Returns month number from date | =MONTH("2024-06-15") | 6 |
| DATE(year, month, day) | Creates a date from parts | =DATE(2024,6,15) | 6/15/2024 |
| TEXT(date, "mmmm") | Returns full month name | =TEXT(A1, "mmmm") | June |
Key Takeaways
Use =MONTH(date) to get the month number from a valid date in Excel.
Ensure the date is recognized by Excel, not just text that looks like a date.
MONTH returns a number from 1 (January) to 12 (December).
Combine MONTH with other functions like DATE or TEXT for more date handling.
MONTH does not return the month name; use TEXT for that.