Forum Discussion
calculer le nombre de mois entre 2 dates dans Excel office 365
François_Soucy The function is DATEDIF, and yes it has it's weaknesses. Documentation in the attached link. Alternatively, just deduct the start date from the end date and divide the result be 30.4167 (that is, the approximate average number of days per month in any given year).
https://support.microsoft.com/en-us/office/datedif-function-25dba1a4-2812-480b-84dd-8b32a451b35c
Riny_van_Eekelen wrote just deduct the start date from the end date and divide the result be 30.4167 (that is, the approximate average number of days per month in any given year).
"approximate"!!??-- how many more decimal places would you need, my friend, before it's the precise average? [smiley face]
- Riny_van_EekelenOct 15, 2021Platinum Contributor
mathetes Haha! As you know, one month may be 28, 29, 30 or 31 days, but never 30,4167. That's why I used the word "approximate". But it's good enough to the "how many months" calculation.
- mathetesOct 15, 2021Silver Contributor
@Riny_van_Eekelen Well, to nit pick words (which happen to be one of several areas of life in which I pick nits), it was actually the phrase "approximate average" that caught my eye. So I was posing the question of how many decimal places were required before we could describe it as a "precise average." {broadly smiling face}