<?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 after midnight in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147726#M889526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How best can i deal with a situation where end time is after midnight and i want to get the duration of a event in mins, that is end time - start time. my solution had eluded date and i have already loaded lots of data to it, which is why i am looking for a workaround.&lt;/P&gt;&lt;P&gt;he is my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (interval(time(end_time)&amp;nbsp; - Time(start_time) ) &amp;lt; 0, 0, ((time(end_time) - time(start_time))*1440&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my start time is 15:01 and end time is 00:37, this is leading to wrong results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>time after midnight</title>
      <link>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147726#M889526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How best can i deal with a situation where end time is after midnight and i want to get the duration of a event in mins, that is end time - start time. my solution had eluded date and i have already loaded lots of data to it, which is why i am looking for a workaround.&lt;/P&gt;&lt;P&gt;he is my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (interval(time(end_time)&amp;nbsp; - Time(start_time) ) &amp;lt; 0, 0, ((time(end_time) - time(start_time))*1440&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my start time is 15:01 and end time is 00:37, this is leading to wrong results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147726#M889526</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: time after midnight</title>
      <link>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147727#M889527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume that you have also a date-part to this times and could use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interval((end_date + end_time)&amp;nbsp; - (start_date + start_time), 'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 06:50:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147727#M889527</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-09-06T06:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: time after midnight</title>
      <link>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147728#M889528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes will do that &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 20:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147728#M889528</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-06T20:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: time after midnight</title>
      <link>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147729#M889529</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;if there is no date information available and the duration can be 1 day at max then one solution might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_231582_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/136612_QlikCommunity_Thread_231582_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1473200521309503 jive_text_macro" jivemacro_uid="_1473200521309503"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fmod(end_time-start_time+1,1)*1440 as duration_minute&lt;/P&gt;
&lt;P&gt;Inline [&lt;/P&gt;
&lt;P&gt;start_time, end_time&lt;/P&gt;
&lt;P&gt;15:01, 00:37&lt;/P&gt;
&lt;P&gt;15:02, 01:37&lt;/P&gt;
&lt;P&gt;15:03, 02:37&lt;/P&gt;
&lt;P&gt;15:04, 03:37&lt;/P&gt;
&lt;P&gt;15:05, 04:37&lt;/P&gt;
&lt;P&gt;15:06, 05:37&lt;/P&gt;
&lt;P&gt;15:07, 06:37&lt;/P&gt;
&lt;P&gt;15:08, 07:37&lt;/P&gt;
&lt;P&gt;15:09, 08:37&lt;/P&gt;
&lt;P&gt;15:10, 09:37&lt;/P&gt;
&lt;P&gt;15:11, 10:37&lt;/P&gt;
&lt;P&gt;15:12, 11:37&lt;/P&gt;
&lt;P&gt;15:13, 12:37&lt;/P&gt;
&lt;P&gt;15:14, 13:37&lt;/P&gt;
&lt;P&gt;15:15, 14:37&lt;/P&gt;
&lt;P&gt;15:16, 15:37&lt;/P&gt;
&lt;P&gt;15:17, 16:37&lt;/P&gt;
&lt;P&gt;15:18, 17:37&lt;/P&gt;
&lt;P&gt;15:19, 18:37&lt;/P&gt;
&lt;P&gt;15:20, 19:37&lt;/P&gt;
&lt;P&gt;15:21, 20:37&lt;/P&gt;
&lt;P&gt;15:22, 21:37&lt;/P&gt;
&lt;P&gt;15:23, 22:37&lt;/P&gt;
&lt;P&gt;15:24, 23:37&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&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>Tue, 06 Sep 2016 22:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/time-after-midnight/m-p/1147729#M889529</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-09-06T22:22:30Z</dc:date>
    </item>
  </channel>
</rss>

