I need to have 3 checkboxes on a custom object we use to track grants we have awarded.
- Box gets checked one year past the end date of the grant. This one is working fine. Formula used: IF(End_Date__c = TODAY()-365, TRUE, FALSE)
- Box gets checked 3 years past the end date of the grant. Not working. IF(End_Date__c = TODAY()-1095, TRUE, FALSE)
- Box gets checked 5 years past the end date of the grant. Not working. IF(End_Date__c = TODAY()-1825, TRUE, FALSE)
Does it have to do with leap years? If so, I suspect that the first one won't work during a leap year. What should I add to the formula so that it basically reads "if today is at least one year past the grant end date" (or "at least 3 years past" or "at least 5 years last")?
4 answers
Also, I would use an ADDMONTHS Function
1 year
ADDMONTHS( End_Date__c , 12 ) < TODAY()
2 years
ADDMONTHS( End_Date__c , 24 ) < TODAY()
3 years
ADDMONTHS( End_Date__c , 36 ) < TODAY()
5 years
ADDMONTHS( End_Date__c , 60 ) < TODAY()
PS. The ADDMONTHS Function auto-calculates Leap Years