<?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: Comparing timestamps and convert to work-hours. Help? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-timestamps-and-convert-to-work-hours-Help/m-p/303701#M112347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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:18:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-21T11:18:51Z</dc:date>
    <item>
      <title>Comparing timestamps and convert to work-hours. Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-timestamps-and-convert-to-work-hours-Help/m-p/303700#M112346</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;I need to make a large number of calculations with timestamps. Example is the following situation:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Workhours are (always) from 08:00 tm 17:30.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Timestamp1: 20.06.2011 16:00 uur&lt;BR /&gt;Timestamp2: 21.06.2011 09:00 uur&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workhours should result in 2,5 uur. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I calculate this with a qlikview fomula? (So all times between 17:30 and 08:00 should be excluded).&lt;/P&gt;&lt;P&gt;Has any of you handles this before, and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 14:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-timestamps-and-convert-to-work-hours-Help/m-p/303700#M112346</guid>
      <dc:creator />
      <dc:date>2011-06-20T14:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing timestamps and convert to work-hours. Help?</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-timestamps-and-convert-to-work-hours-Help/m-p/303701#M112347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-timestamps-and-convert-to-work-hours-Help/m-p/303701#M112347</guid>
      <dc:creator />
      <dc:date>2011-06-21T11:18:51Z</dc:date>
    </item>
  </channel>
</rss>

