<?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 Time interval between two timestamps but except closed hours in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323896#M1196020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Banjir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you give an example? Or even better send a sample QVW?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 23:12:43 GMT</pubDate>
    <dc:creator>fosuzuki</dc:creator>
    <dc:date>2011-05-06T23:12:43Z</dc:date>
    <item>
      <title>Time interval between two timestamps but except closed hours</title>
      <link>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323895#M1196019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H4&gt;Hi I need some help with Time interval between two timestamps. The function give me the interval without any problem&lt;/H4&gt;&lt;P&gt;Sum ([SLA Resolution Time]-interval([Resolve Date]-[Open Date],'hh:mm:ss'))&lt;/P&gt;&lt;H4&gt;But my problem start when working hour is 0700 - 1800 so is there any easy solution so the time between 18;00;01 and 06;59;59 will not be counted in above function?&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 11:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323895#M1196019</guid>
      <dc:creator />
      <dc:date>2011-04-26T11:09:05Z</dc:date>
    </item>
    <item>
      <title>Time interval between two timestamps but except closed hours</title>
      <link>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323896#M1196020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Banjir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you give an example? Or even better send a sample QVW?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 23:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323896#M1196020</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2011-05-06T23:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Time interval between two timestamps but except closed hours</title>
      <link>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323897#M1196022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may take the numerical difference between the two timestamps. Multiply integer part by 11 and fractional part by 24 to get the hours. This assumes that both the timestamps are in the 7:00 - 18:00 window of time. The attached qvw file shows this simple implementation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have to take into account the non-working hours of holidays and weekends, and if you have to check if the timestamps fall in the working hours, some additional development is needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 May 2011 20:56:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323897#M1196022</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-05-07T20:56:01Z</dc:date>
    </item>
    <item>
      <title>Time interval between two timestamps but except closed hours</title>
      <link>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323898#M1196025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Banjir1848,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also facing this problem.&lt;/P&gt;&lt;P&gt;Can share any sample application realted to this SLA calaculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tthanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 11:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323898#M1196025</guid>
      <dc:creator />
      <dc:date>2011-05-13T11:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Time interval between two timestamps but except closed hours</title>
      <link>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323899#M1196028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As posted in my own subject;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have managed to solve the issue, based on an excel example on this site &lt;A href="http://chandoo.org/wp/2010/09/10/working-hours-formula/"&gt;http://chandoo.org/wp/2010/09/10/working-hours-formula/&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sollution is as follows:&lt;/P&gt;&lt;P&gt;//$1 WorkDayStart. Format 9, 9.5, 21&lt;BR /&gt;//$2 WorkDayEnd.Format 9, 9.5, 21&lt;BR /&gt;//$3 TimeStampStart. Format DateTime&lt;BR /&gt;//$4 TimeStampEnd. Format DateTime&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set fxCalcWorkHours = (($2-$1)*NetWorkDays($3,$4))&amp;nbsp; -(24*(&amp;nbsp; FMOD($3,1)&amp;nbsp; -($1/24)&amp;nbsp; +($2/24)&amp;nbsp; -FMOD($4,1) ));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can load it into a table with the command:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Load *, &lt;/P&gt;&lt;P&gt;$(fxCalcWorkHours(9,18,StartDateTime, EndDateTime) as WorkHoursSpent;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers, Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 11:20:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323899#M1196028</guid>
      <dc:creator />
      <dc:date>2011-06-21T11:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Time interval between two timestamps but except closed hours</title>
      <link>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323900#M1196031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me here, i have used your calculation which works great. however some start dates are at weekends, i want to be able to say if the start date is say on a sunday start the calculation at 8am monday to the close date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can this be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;laura&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 16:18:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-interval-between-two-timestamps-but-except-closed-hours/m-p/323900#M1196031</guid>
      <dc:creator />
      <dc:date>2012-10-31T16:18:17Z</dc:date>
    </item>
  </channel>
</rss>

