<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: calculation error with Networkdays() function in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282499#M26779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem at all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Mar 2017 10:00:32 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-03-14T10:00:32Z</dc:date>
    <item>
      <title>calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282494#M26774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a problem with the networkdays () function.&lt;/P&gt;&lt;P&gt;This function takes into account holidays that are not within the calculation interval:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My date format is as follows:&lt;/P&gt;&lt;P&gt;SET DateFormat = 'DD-MM-YY';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call of the function:&lt;/P&gt;&lt;P&gt;Networkdays ('16 -01-17 ', '19 -01-17') referrals 4, between 16 and 19 January there are 4 working days: the result is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If now I set the {holiday} parameter by simulating a holiday on 20/01/2017 (so after the 19th)&lt;/P&gt;&lt;P&gt;Networkdays ('16 -01-17 ', '19 -01-17', '20 -01-17 ',' 20-01-17 ') references 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this problem every time my end date and the day before a holiday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you ever encountered this problem and what solution have you applied?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 08:52:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282494#M26774</guid>
      <dc:creator />
      <dc:date>2017-03-14T08:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282495#M26775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to replicate the issue only if I added the same date twice in my Holiday... Why are you adding it twice? Is there a reason for adding it twice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:39:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282495#M26775</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-14T09:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282496#M26776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I apply ( but i certainly not understant) the help of the function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellspacing="0" class="TableStyle-tableGrid" height="134" style="margin-bottom: 15px; color: rgb(15, 15, 15); font-family: &amp;quot;Open Sans&amp;quot;, Arial, sans-serif; font-size: 14px; margin-right: auto; height: 132px; width: 636px;"&gt;&lt;TBODY style="border-top-width: 2px; border-top-color: #0f0f0f;"&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyI--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;SPAN class="statement" data-mc-conditions="Targets.NotToTranslate" style="font-weight: bold;"&gt;start_date&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="BodyG--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;The start date to evaluate.&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyI--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;SPAN class="statement" data-mc-conditions="Targets.NotToTranslate" style="font-weight: bold;"&gt;end_date&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="BodyG--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;The end date to evaluate.&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyC--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;SPAN class="statement" data-mc-conditions="Targets.NotToTranslate" style="font-weight: bold;"&gt;holiday&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="BodyA--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;Holiday periods to exclude from working days. A holiday period is stated as a &lt;STRONG&gt;start date and an end date, separated by commas.&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;in my mind, it was mandatory to specify a start and an end date even if it is the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282496#M26776</guid>
      <dc:creator />
      <dc:date>2017-03-14T09:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282497#M26777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look here&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/3.2/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/networkdays.htm" title="https://help.qlik.com/en-US/sense/3.2/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/networkdays.htm"&gt;https://help.qlik.com/en-US/sense/3.2/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/networkdays.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above description sort of looks confusing, but I don't think you need start and end date... this seems to be working also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=NetWorkDays(MakeDate(2017, 01, 16), MakeDate(2017, 01,&lt;SPAN style="color: #ff0000;"&gt; 20&lt;/SPAN&gt;), MakeDate(2017, 01, 20))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giving me 4, just like this is giving me 4&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=NetWorkDays(MakeDate(2017, 01, 16), MakeDate(2017, 01, &lt;SPAN style="color: #ff0000;"&gt;19&lt;/SPAN&gt;), MakeDate(2017, 01, 20))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:55:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282497#M26777</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-14T09:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282498#M26778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282498#M26778</guid>
      <dc:creator />
      <dc:date>2017-03-14T09:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282499#M26779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem at all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 10:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282499#M26779</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-14T10:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282500#M26780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can only hope that the description in the online help is wrong...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AFAIK, Networkdays() required to list optional holidays, a value per holiday date.&lt;/P&gt;&lt;P&gt;If this has changed, I guess it will break a lot of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I guess it's just one of the wrong descriptions in the Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the old help text:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor526"&gt;&lt;/A&gt;&lt;A name="networkdays"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;networkdays (&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;start:date, end_date {, holiday}&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Returns the number of working days (Monday-Friday) between and including &lt;SPAN class="Italic"&gt;start_date&lt;/SPAN&gt; and &lt;SPAN class="Italic"&gt;end_date&lt;/SPAN&gt; taking into account any optionally listed &lt;SPAN class="Italic"&gt;holidays&lt;/SPAN&gt;. All parameters should be valid dates or timestamps.&lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;networkdays ('2007-02-19', '2007-03-01')&lt;/SPAN&gt; returns 9 &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;networkdays ('2006-12-18', '2006-12-31', '2006-12-25', '2006-12-26')&lt;/SPAN&gt; returns 8 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new help tells instead:&lt;/P&gt;&lt;TABLE cellspacing="0" class="TableStyle-tableGrid" style="margin-bottom: 15px; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px; margin-right: auto;"&gt;&lt;TBODY style="border-top-width: 2px; border-top-color: #0f0f0f;"&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyC--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;SPAN class="statement" data-mc-conditions="Targets.NotToTranslate" style="font-weight: bold;"&gt;holiday&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="BodyA--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;Holiday periods to exclude from working days. A holiday period is stated as a start date and an end date, separated by commas.&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: inherit; margin: 0 0 5px; font-weight: bold;"&gt;&lt;SPAN class="autonumber"&gt;Example: &lt;/SPAN&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;'25/12/2013', '26/12/2013'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;You can specify more than one holiday period, separated by commas.&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: inherit; margin: 0 0 5px; font-weight: bold;"&gt;&lt;SPAN class="autonumber"&gt;Example: &lt;/SPAN&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;'25/12/2013', '26/12/2013', '31/12/2013', '01/01/2014'&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;But looking at the specific values it's hard to tell if it is using interval start end dates or single holiday values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But we can easily test it:&lt;/P&gt;&lt;P&gt;=NetWorkDays(MakeDate(2017, 01, 16), MakeDate(2017, 01, 19), MakeDate(2017, 01, 17), MakeDate(2017, 01, 19))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returns 2, not 1. So no period is used in holidays (edit: in QV11.20 SR12)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 10:08:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282500#M26780</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-03-14T10:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282501#M26781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That means, if we have several period of two weeks of days off&amp;nbsp; , we need to specify in the holidays list , for each period, each days of the two weeks.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 10:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282501#M26781</guid>
      <dc:creator />
      <dc:date>2017-03-14T10:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282502#M26782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, that's how I understand the function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:55:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1282502#M26782</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-03-14T11:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1673222#M51002</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;can you please help me to calculating the time diff between two dates based on given points&lt;/P&gt;&lt;P&gt;1- First I have to calculate the time weekdays in between 7 Am to 11 PM excluding sat and sun . am using below script for this but prob is that when both the dates are weekend then its also calculate the time diff&amp;nbsp; .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(not WildMatch(IssueStatus,'Pending') , (Interval((RangeMin(frac(IssueResolutionDate), MakeTime(23))- RangeMax(frac(IssueCreateDate), MakeTime(7)))+ &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;( NetWorkDays(IssueCreateDate, IssueResolutionDate-1) * MakeTime(16)) ))) as TotalTime,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2-&amp;nbsp;&lt;/STRONG&gt;Second I have to calculate the time diff only Weekend Sat or Sun in between 10 Am to 4 PM . also if any dates is weekend and other one is weekday then it calculate the time based on diff time difference .&lt;/P&gt;&lt;P&gt;3- if any ticket open in the last month and closed in next month then it calculate the time as point 1 except if it comes on weekdays .&lt;/P&gt;&lt;P&gt;Please help me to find the correct result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 06:10:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1673222#M51002</guid>
      <dc:creator>ajayvermaida</dc:creator>
      <dc:date>2020-02-07T06:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: calculation error with Networkdays() function</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1673223#M51003</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;can you please help me to calculating the time diff between two dates based on given points&lt;/P&gt;&lt;P&gt;1- First I have to calculate the time weekdays in between 7 Am to 11 PM excluding sat and sun . am using below script for this but prob is that when both the dates are weekend then its also calculate the time diff&amp;nbsp; .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(not WildMatch(IssueStatus,'Pending') , (Interval((RangeMin(frac(IssueResolutionDate), MakeTime(23))- RangeMax(frac(IssueCreateDate), MakeTime(7)))+&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;( NetWorkDays(IssueCreateDate, IssueResolutionDate-1) * MakeTime(16)) ))) as TotalTime,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2-&amp;nbsp;&lt;/STRONG&gt;Second I have to calculate the time diff only Weekend Sat or Sun in between 10 Am to 4 PM . also if any dates is weekend and other one is weekday then it calculate the time based on diff time difference .&lt;/P&gt;&lt;P&gt;3- if any ticket open in the last month and closed in next month then it calculate the time as point 1 except if it comes on weekdays .&lt;/P&gt;&lt;P&gt;Please help me to find the correct result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 06:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-error-with-Networkdays-function/m-p/1673223#M51003</guid>
      <dc:creator>ajayvermaida</dc:creator>
      <dc:date>2020-02-07T06:09:59Z</dc:date>
    </item>
  </channel>
</rss>

