5 Replies Latest reply: Oct 25, 2017 10:37 AM by Andrea Gigliotti RSS

    Networkdays function issue

    Rajarshi Guin

      Hi All,

       

      I am facing a problem in using the networkdays function. I am using the below formula.

       

      Networkdays([Target Date],$(vEndDate),$(vHolidayDate))

       

      The Target Date is picked from a table column, $(vEndDate) contains the date selected in filter and $(vHolidayDate) contains the dates for the holiday period.

       

      So, for example, if I want to calculate the workdays between 09/01/2017 and 09/30/2017 where the period 09/20/2017-09/22/2017, the values I am passing to the three arguments is as below.

      Target Date- 09/01/2017

      $(vEndDate)- 09/30/2017

      $(vHolidayDate)- '09/20/2017','09/22/2017'


      Now the problem is the output is same both with and without the holiday dates. So, the formulas Networkdays([Target Date],$(vEndDate)) and Networkdays([Target Date],$(vEndDate),$(vHolidayDate)) both return the same output.


      I am assuming that this error is occurring as I am not storing the values in the correct format in the variable $(vHolidayDate). So will this variable contain the data in the format shown above with the quotes or do I need to store the values in this variable in a different format.


      Also all the dates have been converted to MM/DD/YYYY using Date and Floor function.


      Can anyone please let me know how to resolve this.


      Thanks,

      Rajarshi