<?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: Expression with Working Days and working Hours in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434793#M162077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;I'm sorry for bringing this up again after all this years &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;First of all thank you for your solutions, it works great but I have to manage a slightly different situation.&lt;/P&gt;&lt;P&gt;Working hours are different on fridays. I mean, I have:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;9:15-13 and 14:15-17:30 from monday to thursday&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;9:15-13 and 14:15-16:45 on friday&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;How do I accomplish the correct calculation giving this issue? Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2016 12:32:46 GMT</pubDate>
    <dc:creator>francescoasaro</dc:creator>
    <dc:date>2016-10-20T12:32:46Z</dc:date>
    <item>
      <title>Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434787#M162071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm new in qlikview, and i have a question, i want to exctract the hours between two WORKING dates, also taking the hous in each day, like 8am to 6pm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like &lt;/P&gt;&lt;P&gt;m 8am to 1pm and 3pm to 6 pm (without lunch time)&lt;/P&gt;&lt;P&gt;t 8am to 1pm and 3pm to 6pm&lt;/P&gt;&lt;P&gt;w 8am to 1pm and 3pm to 6pm&lt;/P&gt;&lt;P&gt;t 8am to 1pm and 3pm to 6pm&lt;/P&gt;&lt;P&gt;f 8am to 1pm and 3pm to 6pm&lt;/P&gt;&lt;P&gt;s NON&lt;/P&gt;&lt;P&gt;s NON&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;total hours = 40 hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 16:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434787#M162071</guid>
      <dc:creator />
      <dc:date>2012-10-19T16:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434788#M162072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you said working hours per day is 8 right?&lt;/P&gt;&lt;P&gt;then you can use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;=networkdays(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;startdate, end_date )*8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;networkdays(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;startdate, end_date ) gives number of working days between two dates(it considers sat and sun as holiday)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;Hope it helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 16:47:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434788#M162072</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-10-19T16:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434789#M162073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nice!, another question, maybe it's something different =S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i could have my start date like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01-01-2012 15:00:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my end date like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10-02-2012 18:00:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i want to know how many time has elapsed between the dates (with the validation of working dates and working hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe i made my first question wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 17:01:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434789#M162073</guid>
      <dc:creator />
      <dc:date>2012-10-19T17:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434790#M162074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check this post with a similar request:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/252929#252929"&gt;http://community.qlik.com/message/252929#252929&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 17:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434790#M162074</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-19T17:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434791#M162075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works fine excluding the hours before 8:00 and after 18:00, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what about the "lunch time", from 13:00 to 15:00?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i could make a function like : hours = if (&lt;STRONG&gt;MyTime(end-start)&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;8&lt;/STRONG&gt; then &lt;STRONG&gt;MyTime-2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what about if (&lt;STRONG&gt;MyTime &amp;lt; 8&lt;/STRONG&gt; ) ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 19:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434791#M162075</guid>
      <dc:creator />
      <dc:date>2012-10-19T19:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434792#M162076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you follow the idea of the referenced post, you just need to adapt the calculations for first and last day, maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval(&lt;/P&gt;&lt;P&gt;rangesum(&lt;/P&gt;&lt;P&gt;NetWorkDays(DT1+1,DT2-1,$(vHol)) * MakeTime(8)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //8 hours per workday, for all day inbetween the period, excluding bounderies&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,if(NetWorkDays(DT2,DT2,$(vHol)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rangemin(rangemax(frac(DT2),maketime(15)),maketime(18))-Rangemax(rangemin(frac(DT2),maketime(15)),maketime(15))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+Rangemin(rangemax(frac(DT2),maketime(8)),maketime(13))-Rangemax(rangemin(frac(DT2),maketime(8)),maketime(8)),0) // working hours last day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,if(NetWorkDays(DT1,DT1,$(vHol)),Rangemin(rangemax(frac(DT1),maketime(18)),maketime(18))-Rangemax(rangemin(frac(DT1),maketime(18)),maketime(15))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+Rangemin(rangemax(frac(DT1),maketime(13)),maketime(13))-Rangemax(rangemin(frac(DT1),maketime(13)),maketime(8)),0) // working first day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,if(NetWorkDays(DT1,DT1,$(vHol)) and floor(DT1)=floor(DT2),-MakeTime(8)) // correct for first equals last day &lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 20:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434792#M162076</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-19T20:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434793#M162077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;I'm sorry for bringing this up again after all this years &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;First of all thank you for your solutions, it works great but I have to manage a slightly different situation.&lt;/P&gt;&lt;P&gt;Working hours are different on fridays. I mean, I have:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;9:15-13 and 14:15-17:30 from monday to thursday&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;9:15-13 and 14:15-16:45 on friday&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;How do I accomplish the correct calculation giving this issue? Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2016 12:32:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434793#M162077</guid>
      <dc:creator>francescoasaro</dc:creator>
      <dc:date>2016-10-20T12:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with Working Days and working Hours</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434794#M162078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally speaking, it should definitely be possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just need to handle the case 'Working hours on fridays' differently from the other working days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I don't have much time to spent into this right now. It might be better if you create a new thread with your request to get more assistance.&lt;/P&gt;&lt;P&gt;In one of the referenced threads above, I also suggested a script based approach. It might be easier if you start with this approach, creating records per day, decide on the working hours calculation based on weekday of that day and filter the records excluding weekends and holidays at the end.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/251444"&gt;Re: Calculate hours between two Date/Time strings&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 08:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-Working-Days-and-working-Hours/m-p/434794#M162078</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-10-21T08:28:42Z</dc:date>
    </item>
  </channel>
</rss>

