You need to sign in to do that
Don't have an account?
Phillip Moseley
Formula that Calculates Start Date x Length of Terms to Equal Date minus 1 Day
I'm trying to create a field that will calculate the start date times the Length of Terms to give me a date that is minus one day from the total contract length.
For example:
For example:
Start Date 8/22/2014 x Year In Terms 12 would equal an End Date Field 8/21/2015
This would take out the manual process of having to enter a date one day less than the Start Date field. |
Either way some good examples here: https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US)
Here is the formula for adding years to a date, minus a day.
This worked in the edge cases I tried, for example, off the top of my head these are the edge conditions:
Test it out and see.
If there is a case this doesn't work than you'll need to build a more complex formula (like in the examples) that take into account leap years and the edge cases.
All Answers
Either way some good examples here: https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US)
Here is the formula for adding years to a date, minus a day.
This worked in the edge cases I tried, for example, off the top of my head these are the edge conditions:
Test it out and see.
If there is a case this doesn't work than you'll need to build a more complex formula (like in the examples) that take into account leap years and the edge cases.
Glad it worked, if you get a chance can you mark the best answer and that this is solved?
Best,
Jason