
I have created one validation rule to add days to a date field by calculating difference between two dates.
2 answers
Kiran, For calculating difference between two date, you can simply do:
Date_Field1__c - Date_Field2__c
Now , let's say you want to add the result (number) of above equation to a date field (let's call it Date_Field3__c), you will simply do:
Date_Field3__c + (Date_Field1__c - Date_Field2__c)
If you want to update an existing date field (Date_Field3__c), just use the above formula in the field update part of a workflow rule. If you want to create another field that stores the result, just create a new formula field of date type (let's call it Date_Field4__c) and use the second formula that I posted above.