You need to sign in to do that
Don't have an account?
Jane Marchand 2
Calculate Contract End Date using Term in Months
HI
I'm trying to calculate the End Date of a Contract.
I have the Start Date and a Contract Term in Months
I need to make sure I cater for Leap Years
I also need to make sure that the End date DAY is the Start Date DAY decremented by 1.
E.G
Thanks
I'm trying to calculate the End Date of a Contract.
I have the Start Date and a Contract Term in Months
I need to make sure I cater for Leap Years
I also need to make sure that the End date DAY is the Start Date DAY decremented by 1.
E.G
- Start Date 15-03-01
- Term Months: 12
- End Date: 15-02-28 unless it's a leap year, therefore 15-02-29
Thanks
Please refer the below link and let me know if it helps..else I will guide you how to do..
http://www.salesforceweek.ly/2015/01/how-to-formula-add-months-to-date.html
Thanks,
Sandeep
Thanks Sandeep,
I tried working through that formula yesterday.
I just could not figure out how to decrement the end date by 1 day
The formula provided in the link above calculates the end date as exactly the same day as the start date but I need it to be start date (day) - 1.
Any help you could give me would be gratefully appreciated
Thanks
Jane
In that case have you tried using -1..
I mean after all calculation we have date then that date.adddays(-1);
CHeck with this...do addDays(-1)..and let me know if it helps..
Thanks,
Sandeep
And I can not for some reason post the fomula.
so I post image capture.
Please excuse me if you may not understand or you feel bad with my poor English.