Description
Use this function to return the month number from a given date as a number between 1 and 12. Supported in Chains.
Use the MONTH function to extract a month number from a date into a cell or to feed a month number into another function such as DATE.
Syntax
MONTH(number)
Inputs
This function has the following arguments:
| Name | Required | Valid input |
|---|---|---|
number |
Yes | A cell reference, an integer date, or a text date in the format DD/MM/YYYY or YYYY/MM/DD. A formula which results in one of these is also acceptable. Text dates must be enclosed in quotation marks. |
Example
Sample data
| A | B | C | |
|---|---|---|---|
| 1 | Date | Person | Expenses |
| 2 | 2/1/2023 | Abby | $3456.00 |
| 3 | 5/12/2023 | Brandon | $4783.30 |
| 4 | 7/4/2023 | Corinna | $3167.09 |
| 5 | 2/21/2023 | Damon | $2965.89 |
| 6 | 12/5/2023 | Esther | $3014.88 |
| 7 | 6/16/2023 | Francoise | $2762.93 |
Sample formulas
| Use case | Formula | Explanation and Result |
|---|---|---|
| Return the month value for a date in a cell. | =MONTH(A1) |
This formula returns the month number for the date in cell A1. For this data set, the formula returns 2. |
| Return the month value for an explicit date. | =MONTH("17/9/2003") |
Returns the month number for the supplied date of 17/9/2003 . This formula returns 9. |
| Categorize expenses by month. | =SUM(IF(MONTH(A2:A8)=2, C2:C8, 0)) |
This formula works in the following manner:
For this data set, the formula returns: 6421.89 (the sum of rows 2 and 5). |
| Check if a date falls within a specific month. | =IF(MONTH(A7)=12, "December", "Other") |
This formula works in the following manner: IF checks to see if the date in cell A7 falls in December For this data set, the formula returns: Other (because the month is 7 - July). |
Notes
- The Workiva platform stores dates as numbers so they can be used in calculations.
By default, January 1, 1900 = 1. - MONTH always returns an integer between 1 and 12.
- If the supplied or referenced date isn't a valid integer date or in the format DD/MM/YYYY or YYYY/MM/DD, MONTH returns the #NUM! error.
- If a date isn't recognized, MONTH will return the #VALUE! error.
- If a supplied text date isn't in quotation marks, MONTH will return the #VALUE! error.
- If the supplied or referenced date has a time value attached (that is, it's not an integer), that portion is ignored. For example, 45332.75 will be treated as 45332.
- Wildcards don't work with this function.
Related functions
DATE
DATEVALUE
DAY
DAYS
DAYS360
EDATE
EOMONTH
MONTH
NETWORKDAYS
NETWORKDAYS.INTL
WEEKDAY
WORKDAY
WORKDAY.INTL
YEAR
YEARFRAC