3 Replies Latest reply: Nov 7, 2012 11:26 AM by laura howarth RSS

    function:networkday

    marco masin

      Hello everybody,

      the "networkday" function return the number of working days (Monday-Friday) included between "start_date" and "end_date" excluding public holidays.

      I am Italian and Italian  public holidays are different from other countries.
      what are the holidays that excludes the function networkday?
      How do I consider only the Italian festival?

      thak you

        • function:networkday
          Kaushik Solanki

          HI,

           

             In that case you need to specify the holidays in networkday().

           

             For example you want networkdays between 2006-12-18 and 2006-12-31.

           

             If you just give this without the specific holidays you will get 10 as output.

           

             But say you have holiday on 2006-12-25 and 2006-12-26

           

             Then specify like this

           

             networkdays ('2006-12-18', '2006-12-31', '2006-12-25', '2006-12-26')

           

             and you will get answer as 8.

           

          Regards,

          Kaushik Solanki

          • Re: function:networkday
            John Witherspoon

            Here's an example of loading the holidays from a table, as I wouldn't want to edit the expression manually to insert every holiday.  It includes two approaches - custom "functions", and just the holidays as a variable.  I used to prefer custom functions.  Now I prefer a holiday variable due to limitations in passing parameters to custom functions.

              • Re: function:networkday

                Hi John,

                 

                I am unclear of how you have linked the tables.

                 

                I have one table called holidays which has one column called Holidays. How do i link this to my working hours calculation, where currently i have my holiday dates at the top set manually.

                 

                EG Currently i have Set vHol= '25/12/2012', 26/12/2012;

                 

                instead i want to connect to a table from a different db called Holidays, with one column with all holidays in.

                 

                Thanks

                 

                Laura