<?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 Difference between dates - with no holidays in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151529#M29329</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/Script-syntax-_2D00_-Calculate-Neto-Working-Time-between-Date1-and-Date2.qvw]&lt;/P&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Attached an example of what I am trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;Thanks in advance,&lt;/P&gt;&lt;P dir="ltr"&gt;Aldo.&lt;/P&gt;&lt;P dir="ltr"&gt;Below an explanation:&lt;/P&gt;&lt;P dir="ltr"&gt;What I need to achieve, is to calculate the number of working days between &lt;B&gt;Date1&lt;/B&gt; and &lt;B&gt;Date2&lt;/B&gt;, so if&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Date1&lt;/B&gt;= 07/10/2010 - Thursday - Working day&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;08/10/2010 - Friday - NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;09/10/2010 - Saturday- NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;10/10/2010 - Sunday&lt;/P&gt;&lt;P dir="ltr"&gt;11/10/2010 - Monday - Holiday&lt;/P&gt;&lt;P dir="ltr"&gt;12/10/2010 - Tuesday&lt;/P&gt;&lt;P dir="ltr"&gt;13/10/2010 - Wednesday&lt;/P&gt;&lt;P dir="ltr"&gt;14/10/2010 - Thursday&lt;/P&gt;&lt;P dir="ltr"&gt;15/10/2010 - Friday- NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;16/10/2010 - Saturday- NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;17/10/2010 - Sunday&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Date2&lt;/B&gt;= 18/10/2010 - Monday&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;And if I defined 11/10/2010 as Holiday, then I should get:&lt;/P&gt;&lt;P dir="ltr"&gt;Neto Working Days = 6 Days.&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Oct 2010 08:13:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-21T08:13:48Z</dc:date>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151522#M29322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I need to calculate the time in days/hours/minutes between two dates, (substracting holidays).&lt;/P&gt;&lt;P&gt;I need to be able to set which day is a working day, and which one is a holiday.&lt;/P&gt;&lt;P&gt;Which should be the best way to achieve that?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 15:03:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151522#M29322</guid>
      <dc:creator />
      <dc:date>2010-10-20T15:03:32Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151523#M29323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get the number of days easily using the NetWorkDays() function.&lt;/P&gt;&lt;P&gt;Where you can list the holidays as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this is what you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 15:05:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151523#M29323</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-10-20T15:05:51Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151524#M29324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its a start, but I still need some changes:&lt;/P&gt;&lt;P&gt;The first one is that I need to set which days are Neto Work days. I also need to insert holidays.&lt;/P&gt;&lt;P&gt;The second thing is that i need to be able to calculate hours also.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let d1 = makedate(2010,1,1);&lt;/P&gt;&lt;P&gt;let d2 = makedate(2010,1,31);&lt;/P&gt;&lt;P&gt;let DiffDays = d2 - d1;&lt;/P&gt;&lt;P&gt;Let DiffWorkDays = NetWorkDays(d1, d2);&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;makedate(2010,1,1) as Date1,&lt;/P&gt;&lt;P&gt;makedate(2010,1,31) as Date2,&lt;/P&gt;&lt;P&gt;$(DiffDays) as GrossDiff,&lt;/P&gt;&lt;P&gt;$(DiffWorkDays) as NetoDiff&lt;/P&gt;&lt;P&gt;autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 15:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151524#M29324</guid>
      <dc:creator />
      <dc:date>2010-10-20T15:18:39Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151525#M29325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can include list out the holidays in the NetWorkDays() function.&lt;/P&gt;&lt;P&gt;Once you have the number of days - you can derive the number of hours - right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 16:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151525#M29325</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-10-20T16:02:09Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151526#M29326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, but how do I tell to the function NetWorkDays() that muy working days are only Mondays and Wednesadys?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 16:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151526#M29326</guid>
      <dc:creator />
      <dc:date>2010-10-20T16:17:51Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151527#M29327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You either list all Tuesdays, Thursdays and Fridays as holidays (impractical), or you don't use networkdays(). So... you need to know the number of Mondays and Wednesdays between two dates? With holidays removed?&lt;/P&gt;&lt;P&gt;I'd probably build a Workdays table with all the workdays you want to count in it. Then count({&amp;lt;Workday={"&amp;gt;=YourFirstDate &amp;lt;=YourLastDate"}&amp;gt;} Workday). You'll likely need something more interesting in place of YourFirstDate and YourLastDate, but I'm not sure exactly how you're using this functionality, so I don't know what to put there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 19:34:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151527#M29327</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-10-20T19:34:41Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151528#M29328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aldo&lt;/P&gt;&lt;P&gt;John's suggestion should work in your case, but if you want to look at NetwokDays in more detail, I have written a short series on working day calculations in my blog at &lt;A href="http://yahqblog.blogspot.com/" title="http://yahqblog.blogspot.com/"&gt;http://yahqblog.blogspot.com/&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 19:49:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151528#M29328</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-10-20T19:49:14Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151529#M29329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/Script-syntax-_2D00_-Calculate-Neto-Working-Time-between-Date1-and-Date2.qvw]&lt;/P&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Attached an example of what I am trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;Thanks in advance,&lt;/P&gt;&lt;P dir="ltr"&gt;Aldo.&lt;/P&gt;&lt;P dir="ltr"&gt;Below an explanation:&lt;/P&gt;&lt;P dir="ltr"&gt;What I need to achieve, is to calculate the number of working days between &lt;B&gt;Date1&lt;/B&gt; and &lt;B&gt;Date2&lt;/B&gt;, so if&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Date1&lt;/B&gt;= 07/10/2010 - Thursday - Working day&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;08/10/2010 - Friday - NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;09/10/2010 - Saturday- NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;10/10/2010 - Sunday&lt;/P&gt;&lt;P dir="ltr"&gt;11/10/2010 - Monday - Holiday&lt;/P&gt;&lt;P dir="ltr"&gt;12/10/2010 - Tuesday&lt;/P&gt;&lt;P dir="ltr"&gt;13/10/2010 - Wednesday&lt;/P&gt;&lt;P dir="ltr"&gt;14/10/2010 - Thursday&lt;/P&gt;&lt;P dir="ltr"&gt;15/10/2010 - Friday- NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;16/10/2010 - Saturday- NOT Working day&lt;/P&gt;&lt;P dir="ltr"&gt;17/10/2010 - Sunday&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;B&gt;Date2&lt;/B&gt;= 18/10/2010 - Monday&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;And if I defined 11/10/2010 as Holiday, then I should get:&lt;/P&gt;&lt;P dir="ltr"&gt;Neto Working Days = 6 Days.&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Oct 2010 08:13:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151529#M29329</guid>
      <dc:creator />
      <dc:date>2010-10-21T08:13:48Z</dc:date>
    </item>
    <item>
      <title>Difference between dates - with no holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151530#M29330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/NetoWork3.qvw]&lt;/P&gt;&lt;P&gt;I used John's suggestion with IntervalMatch, and it seems to be working.&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Oct 2010 09:18:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-dates-with-no-holidays/m-p/151530#M29330</guid>
      <dc:creator />
      <dc:date>2010-10-24T09:18:31Z</dc:date>
    </item>
  </channel>
</rss>

