You need to sign in to do that
Don't have an account?

Date Field Calculation for Months with 31 Days
We currently have three fields that should work based off of each other:
Contract Term
Start Date
End Date
If the start date and terms are populated, the end date should automatically populate. We've figured this one out.
What we haven't figured out if how to populate the Contract Term with the correct number (12 for example in the case of a year) if the start date and end date are populated. The problem seems to be because some months have 31 days. Does anyone have any idea how to write a formula that would work for this?
Contract Term
Start Date
End Date
If the start date and terms are populated, the end date should automatically populate. We've figured this one out.
What we haven't figured out if how to populate the Contract Term with the correct number (12 for example in the case of a year) if the start date and end date are populated. The problem seems to be because some months have 31 days. Does anyone have any idea how to write a formula that would work for this?
Your query is answered in this blog,
https://getawayposts.com/add-months-date-salesforce-formula-addmonths-function
Check it and use the formula as mentioned.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks.
That helps a lot. I was wondering if you had any idea for this situation however. If I use that, it will calculate the exact number of months. This works correctly. However, an ideal situation has emerged in which it would calculate 364 days in advance. Here is an example:
Start Date: 3/31/2020
End Date: 3/30/2021
Term: 12
While I know I could add 364 days, is there a way to do this but still display the term in months?