Skip to main content The new Salesforce certifications experience is live! Visit Trailhead Academy to explore your new certifications homepage.
Hello,

 

 

 

We have an Evaluation Period - Start Date date field on the opportunity and I would like to calculate the opp age based off of this and not the created date.  I am not sure how to build the AGE formula.

 

 

 

Evaluation_Period_Start_Date__c

 

Any advice is much appreciated.

 

 

 

Thanks,

 

 

 

Aaron

 

 
8 answers
  1. Jan 2, 2018, 6:32 PM

    Ok try a formula like this:

    IF(

    CASE(Stagename,

    "Closed Won",1,

    "Closed Lost",1,

    0 ) =1 ,CloseDate,TODAY())

    -

    Evaluation_Period_Start_Date__c

     

    If you want to use the "IsClosed" checkbox, then like this:

    IF(IsClosed ,CloseDate,TODAY())

    -

    Evaluation_Period_Start_Date__c

     

     
  2. May 5, 2020, 11:32 AM
    Hi guys,

     

    I am trying to calculate basically the same thing = either from Created to TODAY if open, created date to Closed Date if won/lost. But as the created date is a date/time field, it does not work when checking the syntax ?

     

    Do you guys have any idea how i should handle this ?

     

    Thx :)
  3. Jan 2, 2018, 6:29 PM
    Hello,

     

    Yes I would like to calc the age from the eval start date to the current date if the opp is open or to the date if the opp is set to closed (both won and lost)
  4. Jan 2, 2018, 6:27 PM
    I tried something like this but I get an error

     

    Error: Incorrect argument type for function 'DATEVALUE()'.

     

    IF(IsClosed,( 

     

    CloseDate - DATEVALUE(Evaluation_Period_Start_Date__c)), 

     

    TODAY() - DATEVALUE(Evaluation_Period_Start_Date__c))
  5. Jan 2, 2018, 6:25 PM
    For this you'll need to create a number field formula field (with 0 decimal places) subtracting:

     

    Today() - Evaluation_Period_Start_Date__c

     

    This will give you the number of days. If this is a fraction of months or years you can do advanced functions accounting for leap years inside the formula field as well.
  6. Jan 2, 2018, 6:22 PM

    Like this:

    TODAY() - Evaluation_Period_Start_Date__c

     

    This will give you the number of days between Today and the Evaluation_Period_Start_Date__c.
0/9000