Formula for calculating number of months between two given dates
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am trying to build a formula to establish the number of months between the start date of a project and the end date of the project.
With Start date of 2022-09-01 and end date 2023-08-31 that is 12 months, the formula I was using below, which I thought was correct, is calculating 11 months. Where am I going wrong with this?
DateTimeDiff([ProjectEndDate],[ProjectStartDate],"months")
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @hubyh, 11 is correct here, no? At 2023-08-31 only 11 full months have passed, 12 months would need the end date to be a day later i.e. 2023-09-01:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
11 full months
(12-9)+8=11
With your logic, your birthday would be one day earlier each year
You should calculate the difference in days and divide it by 30 to be more precise
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you DataNath
I am new to this, so this is going to cause a problem with my data. Can I use this formula but get it to add 1 day to the end date ? If so what would that formula be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
