<?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: Time and Loops in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744211#M1042930</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Data Nibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works well, thank you.&amp;nbsp; I am &lt;SPAN style="font-size: 13.3333339691162px;"&gt;doing a calculation as such:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=hour(max(TimeTest)&amp;nbsp; - min(TimeTest)) &amp;amp; '&amp;nbsp; hours ' &amp;amp; minute(max(LOG_TIME, Date) - min(LOG_TIME, Date)) &amp;amp; '&amp;nbsp; minutes' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can now calculate the difference, but as you can see, its showing the total duration between 08:51:18 and 13:36:42. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not showing the difference between 08:51:18 and 09:10:41&amp;nbsp; AND THEN 09:10:41 and 13:36:42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG alt="test2.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/72358_test2.JPG.jpg" style="width: 620px; height: 245px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Nov 2014 15:04:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-28T15:04:36Z</dc:date>
    <item>
      <title>Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744209#M1042926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any way of calculating the duration between times?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for example, for Day 3, a user logs in four times.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="duration.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/72356_duration.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;What I wanted to know is that between 02:15:02 and 02:32:24, what is the difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I want to keep looping through the logins... so then what is the difference in hours and minutes between 02:32:24 and 09:24:37 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So on and so forth...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas or tips?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 14:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744209#M1042926</guid>
      <dc:creator />
      <dc:date>2014-11-28T14:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744210#M1042928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sabah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is a date-time-stamp you have there. Those cannot be worked with directly in QlikView - first you have to split it into a date and a time, using sth. like&lt;/P&gt;&lt;P&gt;- DATE(Floor(num([stamp])), 'DD.MM.YYYY')&lt;/P&gt;&lt;P&gt;- TIME(Frac(num([stamp])), 'hh:mm:ss')&lt;/P&gt;&lt;P&gt;=&amp;gt; Then you can just subtract one time from the other and you'll get the difference.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 14:53:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744210#M1042928</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-11-28T14:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744211#M1042930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Data Nibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works well, thank you.&amp;nbsp; I am &lt;SPAN style="font-size: 13.3333339691162px;"&gt;doing a calculation as such:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=hour(max(TimeTest)&amp;nbsp; - min(TimeTest)) &amp;amp; '&amp;nbsp; hours ' &amp;amp; minute(max(LOG_TIME, Date) - min(LOG_TIME, Date)) &amp;amp; '&amp;nbsp; minutes' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can now calculate the difference, but as you can see, its showing the total duration between 08:51:18 and 13:36:42. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not showing the difference between 08:51:18 and 09:10:41&amp;nbsp; AND THEN 09:10:41 and 13:36:42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG alt="test2.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/72358_test2.JPG.jpg" style="width: 620px; height: 245px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744211#M1042930</guid>
      <dc:creator />
      <dc:date>2014-11-28T15:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744212#M1042932</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;In the load script load another table and with help of Interval function get the difference in the time for the first and last time stamp for the difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P&gt;LOAD Day,%Key,Timestamp(timestamp#(LOG_TIME,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss') as LOG_TIME,ID;&lt;/P&gt;&lt;P&gt;LOAD * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Day,%Key,LOG_TIME,ID&lt;/P&gt;&lt;P&gt;3,13828,03/11/2014 02:15:02,1&lt;/P&gt;&lt;P&gt;3,13828,03/11/2014 02:32:24,1&lt;/P&gt;&lt;P&gt;3,13828,03/11/2014 09:24:37,1&lt;/P&gt;&lt;P&gt;3,13828,03/11/2014 10:24:38,1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;%Key,&lt;/P&gt;&lt;P&gt;Timestamp(Min(LOG_TIME)) as MinTime,&lt;/P&gt;&lt;P&gt;Timestamp(Max(LOG_TIME)) as MaxTime,&lt;/P&gt;&lt;P&gt;Interval(Timestamp(Max(LOG_TIME)) - Timestamp(Min(LOG_TIME)),'hh:mm:ss' ) as Diff&lt;/P&gt;&lt;P&gt;Resident tmp&lt;/P&gt;&lt;P&gt;Group By %Key;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TimeDiff.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/72351_TimeDiff.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744212#M1042932</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-11-28T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744213#M1042934</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;Even you can do this in the front end also no need to load another table for this take the straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim1:- Day&lt;/P&gt;&lt;P&gt;Dim2:- %Key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expre1:- Timestamp(Min(LOG_TIME))&lt;/P&gt;&lt;P&gt;Expre2:- Timestamp(Max(LOG_TIME))&lt;/P&gt;&lt;P&gt;Expre3:- Interval(Timestamp(Max(LOG_TIME)) - Timestamp(Min(LOG_TIME)),'hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TimeDiff2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/72352_TimeDiff2.png" style="max-width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:20:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744213#M1042934</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-11-28T15:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744214#M1042936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744214#M1042936</guid>
      <dc:creator />
      <dc:date>2014-11-28T15:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744215#M1042937</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;Thanks, if got correct answer close the thread with appropriate answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744215#M1042937</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-11-28T15:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744216#M1042938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create an additional expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval(LOG_TIME - Above(LOG_TIME))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:29:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-and-Loops/m-p/744216#M1042938</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-11-28T15:29:47Z</dc:date>
    </item>
  </channel>
</rss>

