MONTH() – Extracts the month from a date
The MONTH() function returns the month number (an integer from 1 for January to 12 for December) from a given date.
Syntax
MONTH(date)
- date: A valid date or a cell reference containing a date. This date can be entered as text (e.g., "15/01/2025", conforming to your MathGrid date settings) or be the result of another date function like TODAY().
Basic example
MONTH(T1A1)
Extracts the month number from the date in cell T1A1.
Example outputs:
- If T1A1 contains the date "15/01/2025": MONTH(T1A1) → 1 (for January)
- If TODAY() returns "23/07/2024": MONTH(TODAY()) → 7 (for July)
- If cell T1B2 contains "05-12-2023" (and this matches your date format settings): MONTH(T1B2) → 12 (for December)
Key features
- Numeric output: Always returns a number from 1 to 12.
- Flexible input: Accepts dates as text strings (matching MathGrid's date format settings) or as outputs from other date functions.
- Date part extraction: Specifically isolates the month component from a full date.
Practical uses
- Analyzing data on a monthly basis (e.g., comparing sales figures for March across different years).
- Conditional formatting based on the month (e.g., highlight entries from a specific quarter).
- Grouping data by month.
- As an input for other calculations or functions that require the month number.
Common mistakes
- Incorrect date format: If providing a date as text, ensure it matches the date format specified in MathGrid's settings. An incorrect format can lead to an error or an incorrect month being extracted.
- Using non-date values: Providing text that isn't a valid date or a number that doesn't represent a date will result in an error. For example, MONTH("January") is invalid; it requires a full date.
- Expecting month name: MONTH() returns a number (1-12), not the month name (e.g., "January", "Feb").
MathGrid ©
MathGrid ©