0

How do I create a date formula to show on a report 3 months prior to an account anniversary date. I have been playing around with the below formula but I can not get it to work

IF(MONTH(  Established_Date__c  ) + IF(MONTH( Established_Date__c-((365/12) * 3), IF(YEAR(TODAY())) - (YEAR( Established_Date__c  )), NULL)
0

If you want to know the days left to the next account anniversary, you can use this formula:

IF (
    DATE(
        YEAR(TODAY()),
        MONTH(Anniversary__c),
        DAY(Anniversary__c)
    ) - TODAY() < 0,
    DATE(
        YEAR(TODAY())+1,
        MONTH(Anniversary__c),
        DAY(Anniversary__c)
    ) - TODAY(),
    DATE(
        YEAR(TODAY()),
        MONTH(Anniversary__c),
        DAY(Anniversary__c)
    ) - TODAY()
)

This will return the days until the next anniversary date. It will display 0 when it comes the day! So in your report you can just filter the accounts using this field, getting every account which has 90 or less days left.

0

I'm not sure what is your final intent, but I think you're looking for something like this:

if ( Established_Date__c.addMonths(-3) <= TODAY() , //show , //not show)

Also, here are some of the functions that Salesforce has to help you deal with dates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.