<?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 Interval Time Query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186636#M50654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dayna&lt;BR /&gt;&lt;BR /&gt;If I am not mistaken, TIMETAKEN is in milliseconds. For a day length other than 24 hours, you have to calculate the days and hours separately.&lt;BR /&gt;&lt;BR /&gt;The total number of hours is:&lt;BR /&gt;&lt;BR /&gt;TIMETAKEN / (60 * 60 * 1000)&lt;BR /&gt;&lt;BR /&gt;The days (which are the integer part of the interval) will be:&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;floor(TIMETAKEN / (60 * 60 * 1000) / 7.5)&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;The hours will be the remainder:&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;frac(TIMETAKEN / (60 * 60 * 1000) / 7.5) * 7.5&lt;BR /&gt;&lt;/B&gt; (can't use the Mod function as this only for integers)&lt;BR /&gt;&lt;BR /&gt;But the hours must be divided by 24 to get the fractional part of the interval. So the resulting expression is:&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;interval(floor(TIMETAKEN / (60 * 60 * 1000) / 7.5) +&lt;BR /&gt; frac(TIMETAKEN / (60 * 60 * 1000) / 7.5) * 7.5 / 24)&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;See the attached as an example.&lt;BR /&gt;&lt;BR /&gt;Hope that helps&lt;BR /&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Mar 2011 10:43:36 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2011-03-30T10:43:36Z</dc:date>
    <item>
      <title>Interval Time Query</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186633#M50651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey All!&lt;/P&gt;&lt;P&gt;I have an output that provides the time based on milliseconds, I originally used this to calculate the days/hours for each incident:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;interval&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(&lt;B&gt;TIMETAKEN&lt;/B&gt; / (24 * 60 * 60 * 1000),'DD:hh:mm')&lt;/P&gt;&lt;P&gt;This worked great, but rather than basing it on a 24 hour day, we want to use a 7.5 hour day (working day). When I change 24 to 7.5 my figures get skewed so instead of showing 0.1.30 it gives me 0.4.48.. Any idea what I should do?&lt;/P&gt;&lt;P&gt;Many thanks for your help!&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Dayna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 10:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186633#M50651</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2011-03-29T10:25:03Z</dc:date>
    </item>
    <item>
      <title>Interval Time Query</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186634#M50652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All!&lt;/P&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Dayna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 08:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186634#M50652</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2011-03-30T08:52:15Z</dc:date>
    </item>
    <item>
      <title>Interval Time Query</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186635#M50653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dayna,&lt;/P&gt;&lt;P&gt;Have you tried this:&lt;/P&gt;&lt;P&gt;(&lt;B&gt;TIMETAKEN&lt;/B&gt; / (270000),'DD:hh:mm')&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 10:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186635#M50653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-30T10:09:43Z</dc:date>
    </item>
    <item>
      <title>Interval Time Query</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186636#M50654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dayna&lt;BR /&gt;&lt;BR /&gt;If I am not mistaken, TIMETAKEN is in milliseconds. For a day length other than 24 hours, you have to calculate the days and hours separately.&lt;BR /&gt;&lt;BR /&gt;The total number of hours is:&lt;BR /&gt;&lt;BR /&gt;TIMETAKEN / (60 * 60 * 1000)&lt;BR /&gt;&lt;BR /&gt;The days (which are the integer part of the interval) will be:&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;floor(TIMETAKEN / (60 * 60 * 1000) / 7.5)&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;The hours will be the remainder:&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;frac(TIMETAKEN / (60 * 60 * 1000) / 7.5) * 7.5&lt;BR /&gt;&lt;/B&gt; (can't use the Mod function as this only for integers)&lt;BR /&gt;&lt;BR /&gt;But the hours must be divided by 24 to get the fractional part of the interval. So the resulting expression is:&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;interval(floor(TIMETAKEN / (60 * 60 * 1000) / 7.5) +&lt;BR /&gt; frac(TIMETAKEN / (60 * 60 * 1000) / 7.5) * 7.5 / 24)&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;See the attached as an example.&lt;BR /&gt;&lt;BR /&gt;Hope that helps&lt;BR /&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 10:43:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186636#M50654</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2011-03-30T10:43:36Z</dc:date>
    </item>
    <item>
      <title>Interval Time Query</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186637#M50655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;Jonathan, that's brilliant!! I have one query tho:&lt;/P&gt;&lt;P&gt;It works perfectly when 7.30 is being added (as one entry) but not when there's two entries of 5 (i.e. one on each day or two different records..)&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Dayna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 14:21:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186637#M50655</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2011-03-30T14:21:52Z</dc:date>
    </item>
    <item>
      <title>Interval Time Query</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186638#M50656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aha, my sum's weren't working correctly in the load script - in the expression it works perfectly.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;interval(floor(sum(SUN_IH_Time) / (60 * 60 * 1000) / 7.5) +&lt;BR /&gt; frac(sum(SUN_IH_Time) / (60 * 60 * 1000) / 7.5) * 7.5 / 24,'D-hh:mm')&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 09:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Time-Query/m-p/186638#M50656</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2011-03-31T09:16:55Z</dc:date>
    </item>
  </channel>
</rss>

