3 Replies Latest reply on Aug 16, 2018 10:18 AM by Donna Meyer

    DATEDIFF day count across different years

    Donna Meyer

      I am using the following to determine the number of weekdays between starting and ending a project. I noticed that if the start date is in a previous year, the calculation is wildly off. Not sure how to correct this?


      Example:  Actual Start Date = December 20, 2017 and Delivery Date = January 3, 2018.  Returns a value of 114 days and should be 10 days.


      DATEDIFF('day',[Actual Start Date (Task)],[Delivery Date (Task)])

      -(2*(DATEPART('week',[Delivery Date (Task)])-DATEPART('week',[Actual Start Date (Task)])))


      Thanks for the help!