[SalesForce] Check if two Date Fields are within 60 Days of each other

I need to validate whether the Last_Activity_c occurred within 90 days of the Anticipated_DUE_DATE__c

I came up with the below formula, but it picks up Last activity Dates that are greater than the 60 days. If Anticipated Due Date is 1/1/18, it needs to pick up activities from 10/1/2017 only.

Last_Activity__c - Anticipated_DUE_DATE__c <= 90

Best Answer

IF(Last_Activity_c >(Anticipated_DUE_DATE__c.addDays(90)), False, True)

This formula field of return type checkbox will return "True" ,if Last_Activity_c occurred within 90 days of the Anticipated_DUE_DATE__c.

Related Topic