<?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: Finding the difference between timestamps in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420169#M156332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should let QV interprete your timestamps as such, resulting in values having a numerical part.&lt;/P&gt;&lt;P&gt;To achieve this, use the time interpretion function time#(), like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&lt;EM&gt;time#(TIMEFIELD, 'hh:mm:ss') as TIMEFIELD,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from YourTable;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If QV has interpreted your values correctly, you can then use interval() function to get the difference in time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=interval(ENDTIMEFIELD-STARTTIMEFIELD)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=interval( max(TIMEFIELD) - min(TIMEFIELD) )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2012 16:10:01 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-10-16T16:10:01Z</dc:date>
    <item>
      <title>Finding the difference between timestamps</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420168#M156331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have data that corresponds to several groups of field technicians and the time that they start and complete each job during the day.&amp;nbsp;&amp;nbsp; This timestamp information comes across as HH:MM:SS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for the when a tech starts his FIRST job of the day and when he completes his LAST job of the day.&amp;nbsp; I have been able to find the particular timestamps for this information by using Maxstring and Minstring to display this information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question revolves around finding the difference between these two values.&amp;nbsp;&amp;nbsp; IE, a tech starts at 8am and finishes at 1:30pm so therefore he worked 5.5 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 16:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420168#M156331</guid>
      <dc:creator />
      <dc:date>2012-10-16T16:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the difference between timestamps</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420169#M156332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should let QV interprete your timestamps as such, resulting in values having a numerical part.&lt;/P&gt;&lt;P&gt;To achieve this, use the time interpretion function time#(), like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&lt;EM&gt;time#(TIMEFIELD, 'hh:mm:ss') as TIMEFIELD,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from YourTable;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If QV has interpreted your values correctly, you can then use interval() function to get the difference in time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=interval(ENDTIMEFIELD-STARTTIMEFIELD)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=interval( max(TIMEFIELD) - min(TIMEFIELD) )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 16:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420169#M156332</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-16T16:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the difference between timestamps</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420170#M156333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, that works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that i could also do the same thing by changing the data type directly using the number tab in my chart properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate the quick response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 17:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420170#M156333</guid>
      <dc:creator />
      <dc:date>2012-10-16T17:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the difference between timestamps</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420171#M156334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, that works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that i could also do the same thing by changing the data type directly using the number tab in my chart properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate the quick response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 17:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-difference-between-timestamps/m-p/420171#M156334</guid>
      <dc:creator />
      <dc:date>2012-10-16T17:25:03Z</dc:date>
    </item>
  </channel>
</rss>

