5 Replies Latest reply: Mar 7, 2016 3:58 AM by Oliver Annells RSS

    Differing behaviour in script and front end

    Oliver Annells

      Hi

       

      I am sure there is a valid explanation why this is happening but as I can't figure it out I am turning to the experts.


      I have a table which loads UK bank holidays from the web and then concatenates/comma separates them.  I then move them into a variable as follows:

      LET PublicHolidayList = peek('PublicHolidayList');

       

      This is the result:

      '01/01/2015', '01/01/2016', '01/05/2017', '02/01/2017', '02/05/2016', '03/04/2015', '04/05/2015', '06/04/2015', '14/04/2017', '17/04/2017', '25/03/2016', '25/05/2015', '25/12/2015', '25/12/2017', '26/12/2016', '26/12/2017', '27/12/2016', '28/03/2016', '28/08/2017', '28/12/2015', '29/05/2017', '29/08/2016', '30/05/2016', '31/08/2015'

       

      In my calendar load I am using this statement:

      networkdays(monthstart(Date,0),Date,$(#PublicHolidayList))


      If I use the exact same statement in a chart I get different (correct) results.

      For January 2016

      DateNetWorkDays (script)NetWorkDays (table expr)
      01/01/201610
      02/01/201610
      03/01/201610
      04/01/201621
      05/01/201632
      06/01/201643

      etc...


      It looks like the script is not 'seeing' a valid date in the last argument of networkdays and assigning it a work day.


      What am I missing?


      Thanks

      Oli