You need to sign in to do that
Don't have an account?
chiranjib rout
how do I add 6 months to a date field in a formula??
hii everyone, how do I add 6 months to a date field in a formula? There are two Date fields date of joining(DOJ_c) and a formulafield (Conformation_Date_c) ,if i put any date in date of joining (DOJ_c) field then in the conformation date =(date of joining + 6 month). kindly provide the formula for conformation Date.
Use following formula for the formula field Confirmation_Date__c (return type Date)
This formula works for every month from 1 to 12.
mark this as Best Answer, if this solves your problem.
All Answers
Create formula field 'Conformation Date' of type Date and use below formula: Thanks,
Dhanya
Use following formula for the formula field Confirmation_Date__c (return type Date)
This formula works for every month from 1 to 12.
mark this as Best Answer, if this solves your problem.
An easy way out of this is to simply add 180 days to DOJ__c in the formula editor. Confirmation_Date__c (return type Date)
Because, such problem would arise for all "31st" dates and also for the 29th feb(in case of leap year).
It would require too many cases and conditions, that would make the formula fairly complex.
And i don't think, its that important to put that much effort.
Because, even if you try to implement a complex formula, the confirmation date would be different from joining date (in case of31 st of month, 29 th feb), it has to be reduced by one day. There are too many edge cases to consider.
You can use the ADDMONTHS(Date,Num) formula that will take in concideration the 31 of each months and the 28 - 29 of febuary.
Here is where I found it : https://trailhead.salesforce.com/fr/content/learn/modules/advanced_formulas/date_formulas
All the best