<?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 Trip duration from Log Dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550857#M39707</link>
    <description>&lt;P&gt;Good Day. The below data shows an extract of a track log for trips. What I need to determine is the number of 'Trip Days'. For example, for trip aaaa all the dates of the 27th will be day 1, the 29th will be day 2, the 30th will be day 3 and so on. I need to end up with trip aaaa being 4 days and trip bbbb 3 days. The issue I am having is that I cannot get the counter variable to step correctly. The attached qvf has the script I am using. I appreciate the assistance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trip, Time&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 19:59&lt;BR /&gt;aaaa, 2018-07-29 07:49&lt;BR /&gt;aaaa, 2018-07-29 07:49&lt;BR /&gt;aaaa, 2018-07-29 07:50&lt;BR /&gt;aaaa, 2018-07-29 07:50&lt;BR /&gt;aaaa, 2018-07-29 07:50&lt;BR /&gt;aaaa, 2018-07-30 15:03&lt;BR /&gt;aaaa, 2018-07-30 15:03&lt;BR /&gt;aaaa, 2018-07-30 15:03&lt;BR /&gt;aaaa, 2018-07-30 15:04&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-30 15:03&lt;BR /&gt;bbbb, 2018-07-30 15:04&lt;BR /&gt;bbbb, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-31 08:12];&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2019 03:49:31 GMT</pubDate>
    <dc:creator>johngouws</dc:creator>
    <dc:date>2019-03-01T03:49:31Z</dc:date>
    <item>
      <title>Trip duration from Log Dates</title>
      <link>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550857#M39707</link>
      <description>&lt;P&gt;Good Day. The below data shows an extract of a track log for trips. What I need to determine is the number of 'Trip Days'. For example, for trip aaaa all the dates of the 27th will be day 1, the 29th will be day 2, the 30th will be day 3 and so on. I need to end up with trip aaaa being 4 days and trip bbbb 3 days. The issue I am having is that I cannot get the counter variable to step correctly. The attached qvf has the script I am using. I appreciate the assistance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trip, Time&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 06:08&lt;BR /&gt;aaaa, 2018-07-27 19:59&lt;BR /&gt;aaaa, 2018-07-29 07:49&lt;BR /&gt;aaaa, 2018-07-29 07:49&lt;BR /&gt;aaaa, 2018-07-29 07:50&lt;BR /&gt;aaaa, 2018-07-29 07:50&lt;BR /&gt;aaaa, 2018-07-29 07:50&lt;BR /&gt;aaaa, 2018-07-30 15:03&lt;BR /&gt;aaaa, 2018-07-30 15:03&lt;BR /&gt;aaaa, 2018-07-30 15:03&lt;BR /&gt;aaaa, 2018-07-30 15:04&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;aaaa, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-27 06:08&lt;BR /&gt;bbbb, 2018-07-30 15:03&lt;BR /&gt;bbbb, 2018-07-30 15:04&lt;BR /&gt;bbbb, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-31 08:12&lt;BR /&gt;bbbb, 2018-07-31 08:12];&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 03:49:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550857#M39707</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2019-03-01T03:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trip duration from Log Dates</title>
      <link>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550888#M39709</link>
      <description>&lt;P&gt;Extract the Date from the date/time value and use the extended autonumber for this:&lt;/P&gt;&lt;PRE&gt;t1:
LOAD Trip,	
    Date(Floor(Date#(Time, 'yyyy-MM-dd hh:mm'))) as Date,&lt;BR /&gt;    Time(Frac(Date#(Time, 'yyyy-MM-dd hh:mm'))) as Time 
INLINE [ 
Trip,	Time
aaaa,	2018-07-27 06:08
aaaa,	2018-07-27 06:08
...&amp;lt;snip&amp;gt;...
bbbb,	2018-07-31 08:12];

t2:
LOAD 
    Trip,
    Date, 
    Time,
    AutoNumber(Date, Trip) as [Trip Day]
Resident t1 &lt;BR /&gt;
Drop Table t&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 05:04:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550888#M39709</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-03-01T05:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trip duration from Log Dates</title>
      <link>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550891#M39711</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 613px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7043i1374D443C25D86B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 05:15:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550891#M39711</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-03-01T05:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trip duration from Log Dates</title>
      <link>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550895#M39712</link>
      <description>Thank you Jonty. Works perfectly. Who could have thought I could be so far off.</description>
      <pubDate>Fri, 01 Mar 2019 05:34:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trip-duration-from-Log-Dates/m-p/1550895#M39712</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2019-03-01T05:34:28Z</dc:date>
    </item>
  </channel>
</rss>

