+ Start a Discussion
Shannon Andreas 1Shannon Andreas 1 

Need a future date formula

Hello!

I was wondering if someone could help me out with a formula.

I need a formula that calculates the future date of a contract expiration.So the case goes like this:

Effective Date of contract year 1 = Service_Effective_Date__c
End date of contract year 1 = 12 months from Service_Effective_Date__c
Effective Date of contract year 2 = End date of Contract year 1 + 1 day
End Date of contract year 2 = 12 months from Effective Date of contract year 2
Effective Date of contract year 3 = End date of Contract year 2 + 1 day
End Date of contract year 3 = 12 months from Effective Date of contract year 3

Of course, I tried adding 365 days, but as you all know, that won't account for leap years and varying numbers of days in a month.

There is a contract term field which indicates the term in months of a contract if that would be easier to use.

Any help is appreciated.

Shannon
 
pconpcon
Take a look over this documentation [1].  This will show you how to add years and days in your formula.

[1] https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US#adding-dmy-to-date (https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US#adding-dmy-to-date)
Adam CoppinAdam Coppin
Hi Shannon,

I'd recommend using a trigger to update the values into holder fields - that would separate the formulas from the object (making them a little easier to administer) and give you fields that you an use for formulas and manipulations a little more easily elsewhere.

Just a thought!