Returns the number of months between two given dates.
Syntax
MONTHS(start_date; end_date; [mode])
start_date: The date from which to calculate the number of months. E.g. "2/5/2020"
end_date: The date up to which to calculate the number of months. E.g. "7/8/2020"
mode: Determines the method to calculate the number of months. Defaults to 0 if omitted.
Examples
|
Formula |
Result |
|
=MONTHS("2/5/2020";"7/8/2020") |
5 |
|
=MONTHS(E2;F2;1) |
2 |
|
=MONTHS("1/1/2018";"1/1/2019") |
12 |
Possible Errors
|
Errors |
Meaning |
|
#N/A! |
|
|
#NAME! |
|
|
#VALUE! |
|
|
#REF! |
|
Similar Functions