2 Replies Latest reply on Sep 18, 2017 1:55 PM by Justin Larson

    Looking for Help with a Date Difference Calculation

    Alex Dumlao

      Hello Everyone,

       

      I'm looking for some help or insight on how I can create a calculation that would calculate the number of days between a "Target Date" and a "Last Completed Date". I'm wanting to display the number of days between both. For example:

       

      • "Target Date" is the planned date of when action should be taken
      • "Last Completed Date" is the actual date where the action was complete

       

      I was successful calculating this if the "Last Completed Date" is a null value, but for some reason it is not working if there is a tangible date for "Last Completed Date":

       

      IF ([Status of Problem Record]="Cancelled Record") THEN 0

      ELSEIF ([Status of Problem Record]="Completed Record")THEN ([Last Completed Date]-[Submit Date])

      ELSE(NOW()-[Target Date])

      END

       

      I'm guessing it has something to do with ([Status of Problem Record]="Completed Record"), and if so I'm having troubles writing it so it neglects the "Cancelled Record" and includes all other values for [Status of Problem Record]

       

      Thanks in advance for any help for this ongoing newbie

       

      Much Appreciated,

       

      Alex