You need to sign in to do that
Don't have an account?
SFDC_2706
Calculate formula with adding months
Hi All,
I need quick advice on this following item. I need to calculate new formula field which will add 1 month, 3 months, 6 months, 1 year and none from the existing due date field when picklist field is selected as below:
Formula example :
If Picklist value is selected 'Annually' then formula would be (Due_Date__c + 1 Year)
Annually : Due_Date__c + 1 Year
Half-yearly : Due_Date__c + 6 Months
Quarterly : Due_Date__ct + 3 Months
Monthly : Due_Date__c + 1 Month
None : Blank
Looking forward for the quick help and thanks in advance..!!
This example formula adds two months to a given date. You can modify the conditions on this formula if you prefer different behaviors for dates at the end of the month.
Refer the below link
https://help.salesforce.com/s/articleView?id=sf.formula_examples_dates.htm&type=5
If this helps, Please mark it as best answer.
Thanks!!
try with below code
If this helps, Please mark it as best answer.
Thanks!!
Hey,
Thanks for your replies. Really appreciate it. I tried with below formula and it worked. Similar as yours but used CASE function instead of multiple if's.
CASE(GAM_RecurrenceFrequency__c,
"Monthly", ADDMONTHS(RocketDocs__Due_Date__c,1) ,
"Quarterly", ADDMONTHS(RocketDocs__Due_Date__c,3),
"Half Yearly", ADDMONTHS(RocketDocs__Due_Date__c,6),
"Annually", ADDMONTHS(RocketDocs__Due_Date__c,12), null)
Thanks fro the update.
If my answer helps, Please mark it as best answer.
Thanks!!