4 Replies Latest reply on Nov 22, 2018 1:10 PM by Peter Fakan

    Datediff Days not showing 0 days values

    Brooke Young

      I'm a novice when it comes to calculated fields. I have a calculation to compare 2 dates, which is working fine. However, when it compares two dates and the datediff is 0 days, it returns blank values. How can I get it to return 0 if the datediff is 0 days?


      Here's my calculation:

       

      IF [IntakeStatus]=='Closed' AND [AdmissionDate] >= #4/1/2018# THEN (DATEDIFF('day',[AdmissionDate],IFNULL([StartDate],[AdmissionClosingDate])))

      ELSEIF [IntakeStatus]=='Close Confirm' AND [AdmissionDate] >= #4/1/2018# THEN (DATEDIFF('day',[AdmissionDate],IFNULL([StartDate],[AdmissionClosingDate])))

      ELSE Null

      END

       

      Any help appreciated!
      Thanks
      Brooke