<?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 split in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-split/m-p/423008#M701283</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For anyone interested this script did what i wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stationary_time_split:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hour(time(HourStart, 'hh:mm')) as HourID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time(HourStart, 'hh:mm') as HourStart,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time(HourEnd, 'hh:mm') as HourEnd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num#(interval(time(rangemin([Vacated Time], HourEnd), 'hh:mm') - time(rangemax([Arrived Time], HourStart), 'hh:mm') , 'mm') ) as ActiveTime&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; floor([Arrived Time], 1/24) + (Iterno() - 1)/24 as HourStart,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; floor([Arrived Time], 1/24) + (Iterno())/24&amp;nbsp; as HourEnd &lt;/P&gt;&lt;P&gt;resident Bay_Sensor_activity&lt;/P&gt;&lt;P&gt;while &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; floor([Arrived Time], 1/24) + Iterno()/24 &amp;lt;= ceil([Vacated Time], 1/24) + 0.02 // &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;This broke my time based data into hourly segments based on the start and end time.&amp;nbsp; It calculates the time between each hour period so that i can see the profile of time being taken over the respective hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks to &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/troyansky" id="jive-23101456363710687935" style="background-color: #d6f5b9; font-size: 12px; color: #007fc0; font-weight: bold; font-family: Arial; text-align: center;"&gt;Oleg Troyansky&lt;/A&gt; for providing the answer in the previous post that i have adapted!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2012 17:46:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-19T17:46:48Z</dc:date>
    <item>
      <title>Time split</title>
      <link>https://community.qlik.com/t5/QlikView/Time-split/m-p/423007#M701282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have me record set which contains a start and end datetime field.&amp;nbsp; I can capture the number of minutes between these 2 fields.&amp;nbsp; What i need to do is split the total minutes down over a 24 hour period so that i can see how many of those minutes were between 10-11, 11-12, 12-13 etc...&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After extensively searching the community pages and trying different things i've come to the conclusion that i would perhaps best achieve this by using a LOOP to generate the 24 hour time periods for each row into a new table nad split the number of minutes across each time band.&amp;nbsp; I'll also need to store the ROW_ID for each record into this table.&amp;nbsp; i'm pretty sure this will give me what i need but i don't really know where to begin on this one...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is anyone able to help to get me moving in the right direction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lewis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/60017#60017"&gt;http://community.qlik.com/message/60017#60017&lt;/A&gt;&amp;nbsp; i've seen this post so i'm looking at using this method to see if i can get what i want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 15:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-split/m-p/423007#M701282</guid>
      <dc:creator />
      <dc:date>2012-09-19T15:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Time split</title>
      <link>https://community.qlik.com/t5/QlikView/Time-split/m-p/423008#M701283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For anyone interested this script did what i wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stationary_time_split:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hour(time(HourStart, 'hh:mm')) as HourID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time(HourStart, 'hh:mm') as HourStart,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time(HourEnd, 'hh:mm') as HourEnd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num#(interval(time(rangemin([Vacated Time], HourEnd), 'hh:mm') - time(rangemax([Arrived Time], HourStart), 'hh:mm') , 'mm') ) as ActiveTime&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; floor([Arrived Time], 1/24) + (Iterno() - 1)/24 as HourStart,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; floor([Arrived Time], 1/24) + (Iterno())/24&amp;nbsp; as HourEnd &lt;/P&gt;&lt;P&gt;resident Bay_Sensor_activity&lt;/P&gt;&lt;P&gt;while &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; floor([Arrived Time], 1/24) + Iterno()/24 &amp;lt;= ceil([Vacated Time], 1/24) + 0.02 // &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;This broke my time based data into hourly segments based on the start and end time.&amp;nbsp; It calculates the time between each hour period so that i can see the profile of time being taken over the respective hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks to &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/troyansky" id="jive-23101456363710687935" style="background-color: #d6f5b9; font-size: 12px; color: #007fc0; font-weight: bold; font-family: Arial; text-align: center;"&gt;Oleg Troyansky&lt;/A&gt; for providing the answer in the previous post that i have adapted!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 17:46:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-split/m-p/423008#M701283</guid>
      <dc:creator />
      <dc:date>2012-09-19T17:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Time split</title>
      <link>https://community.qlik.com/t5/QlikView/Time-split/m-p/423009#M701284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually have kind of the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your solution and it works great. However, I also need to include the date aswell. I have have a list of shifts that have a start date with time and and end date with time. So I also need to know the day of the interval, not just the hour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I have a shift that goes on for 2 days, I'm gonna have 2 slots for the same time stamp, lets say '03:00-04:00', without knowing which day is what.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know a solution for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 10:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-split/m-p/423009#M701284</guid>
      <dc:creator />
      <dc:date>2013-10-09T10:50:52Z</dc:date>
    </item>
  </channel>
</rss>

