<?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 duration over multiple days in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/duration-over-multiple-days/m-p/895443#M311702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to figure out the easiest way to split a field that tracks duration into two rows.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I begin ProcessA at 23:00 on 6/22/15, and it completes at 02:00 on 6/23/15.&amp;nbsp; The duration is 3 hours.&amp;nbsp; I want to create two rows, the first with a duration of 1 hour, with a start date of 6/22/15 23:00 and the second with a duration of 2 hours with a start date of 6/23/15 00:00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, I have 1 row, with a Start Date of 6/22 and a Complete Date of 6/23 and a duration of 3 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2015 20:44:11 GMT</pubDate>
    <dc:creator>michaeldburt</dc:creator>
    <dc:date>2015-06-24T20:44:11Z</dc:date>
    <item>
      <title>duration over multiple days</title>
      <link>https://community.qlik.com/t5/QlikView/duration-over-multiple-days/m-p/895443#M311702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to figure out the easiest way to split a field that tracks duration into two rows.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I begin ProcessA at 23:00 on 6/22/15, and it completes at 02:00 on 6/23/15.&amp;nbsp; The duration is 3 hours.&amp;nbsp; I want to create two rows, the first with a duration of 1 hour, with a start date of 6/22/15 23:00 and the second with a duration of 2 hours with a start date of 6/23/15 00:00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, I have 1 row, with a Start Date of 6/22 and a Complete Date of 6/23 and a duration of 3 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 20:44:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duration-over-multiple-days/m-p/895443#M311702</guid>
      <dc:creator>michaeldburt</dc:creator>
      <dc:date>2015-06-24T20:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: duration over multiple days</title>
      <link>https://community.qlik.com/t5/QlikView/duration-over-multiple-days/m-p/895444#M311703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can start with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set TimestampFormat = 'M/D/YY hh:mm TT';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; INPUT:&lt;/P&gt;&lt;P&gt;LOAD *, recno() as ID INLINE [&lt;/P&gt;&lt;P&gt;DT1, DT2&lt;/P&gt;&lt;P&gt;8/9/12 11:08 AM,8/9/12 2:57 PM&lt;/P&gt;&lt;P&gt;8/18/12 09:20 AM,8/20/12 01:13 PM&lt;/P&gt;&lt;P&gt;8/17/12 09:20 AM,8/20/12 01:13 PM&lt;/P&gt;&lt;P&gt;8/17/12 09:20 AM,8/19/12 01:13 PM&lt;/P&gt;&lt;P&gt;6/27/12 12:41 PM,&amp;nbsp;&amp;nbsp;&amp;nbsp; 7/6/12 4:38 PM&lt;/P&gt;&lt;P&gt;6/29/12 4:45 PM,&amp;nbsp;&amp;nbsp;&amp;nbsp; 7/6/12 4:19 PM&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;8/1/12 09:00 AM, 8/3/12 10:00 AM&lt;/P&gt;&lt;P&gt;8/3/12 03:00 PM, 8/6/12 09:00 AM&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT:&lt;/P&gt;&lt;P&gt;LOAD *, interval(End-Start,'hh:mm:ss.fff') as Duration;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;Date(daystart(DT1)+iterno()-1) as Date,&lt;/P&gt;&lt;P&gt;Time(if(iterno()=1, frac(DT1), 0)) as Start,&lt;/P&gt;&lt;P&gt;Time(if(daystart(DT1)+iterno()-1=daystart(DT2),frac(DT2), dayend(0) )) as End&lt;/P&gt;&lt;P&gt;Resident INPUT&lt;/P&gt;&lt;P&gt;while daystart(DT2) &amp;gt;= daystart(DT1)+iterno()-1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 21:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duration-over-multiple-days/m-p/895444#M311703</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-24T21:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: duration over multiple days</title>
      <link>https://community.qlik.com/t5/QlikView/duration-over-multiple-days/m-p/895445#M311704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/90733_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Process,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Timestamp#(StartTimeStamp, 'M/DD/YY hh:mm') as StartTimeStamp,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Timestamp#(EndTimeStamp, 'M/DD/YY hh:mm') as EndTimeStamp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Process, StartTimeStamp, EndTimeStamp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ProcessA, 6/22/15 23:00, 6/23/15 02:00&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Process,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; StartTimeStamp,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; EndTimeStamp,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Interval(DayEnd(StartTimeStamp) - StartTimeStamp + (1/(24*60*60)), 'hh:mm') as Hours&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate (FinalTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Process,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; StartTimeStamp,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; EndTimeStamp,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Interval(EndTimeStamp - DayStart(EndTimeStamp), 'hh:mm') as Hours&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 21:08:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duration-over-multiple-days/m-p/895445#M311704</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-24T21:08:02Z</dc:date>
    </item>
  </channel>
</rss>

