Skip to main content
Sole Angel a posé une question dans #Data Management
I am struggling with a date formula.

 

I have two fields with dates on them (Last call on lead, Last call on contact). I need a third to calculate the latest between the two, and the days since then. 

 

For instance, in a simplistic way, it should be:

 

Today() - 

 

MAX(last cal on leads, last call on contacts)

 

^This of course does not work as MAX expect number, not date. 

 

How can I achieve it?

 

Thank you!
4 réponses
  1. 3 févr. 2020, 06:51

    Hi Sole,

    You can try this Formula. I hope it will work well:

    IF(  ISBLANK(Last_Call_On_Contacts__c),  Today() - Last_Call_On_Leads__c , 

    IF(  ISBLANK(Last_Call_On_Leads__c ),  Today() - Last_Call_On_Contacts__c, 

    IF ( ( Last_Call_On_Leads__c  >= Last_Call_On_Contacts__c) , Today() - Last_Call_On_Leads__c  , 

    IF ( ( Last_Call_On_Contacts__c > Last_Call_On_Leads__c  ) , Today() - Last_Call_On_Contacts__c , 0 )

    )

    )

    )

     

    Thank You,

     

    Piyush
0/9000