7 Replies Latest reply: Jul 18, 2016 1:06 AM by Prashant Sangle RSS

    Networkdays function

    Jo Tedesco

      Hi - to give an example of what I mean:

      datestamp 1     1/1/2016 9:00 am

      datestamp 2     1/1/2016 9:30 am

       

      if I use the function

      Networkdays(datestamp1, datestamp2) - the answer is 1

       

      if I use sum(timestamp2 - timestamp1) -  the answer is 0.0 something.

      I have been asked to show Networking days as 0 - if the two timestamps occur on the same days.  Simple formula:

      Networkdays(datestamp1, datestamp2) -1

      But - working on some scenarios of dates - there is a problem when timestamp2 occurs on a Saturday.

       

      for example:

      Tuesday 7/06/2016  2:00:00 PM  and  Saturday11/06/2016  3:00:00 PM

          

      dateCTdateQAanswerNetwork days
      Wednesday, 1 June 2016Wednesday, 1 June 20160.0416666671
      Wednesday, 1 June 2016Thursday, 2 June 20161.0416666672
      Tuesday, 7 June 2016Friday, 10 June 20163.0416666674
      Tuesday, 7 June 2016Saturday, 11 June 20164.0416666674
      Wednesday, 1 June 2016Wednesday, 1 June 20160.0013888891

       

       

      (NetworkDays -1) will give 3 days which is not correct.

       

      Will this problem only occur when timestamp2 is a weekend date?

      Will I need to have another formula to account for these occassions?

       

      Thank you

      Jo