<?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: Timestamp to minutes in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Timestamp-to-minutes/m-p/1854349#M70528</link>
    <description>&lt;P&gt;Assuming the field "timestamp" is a proper Qlik datetime -- it appears it is from your example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;timestamp - Previous(timestamp)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;returns the difference as integer number of days and fractional part of a day.&amp;nbsp; You have two choices to convert this to&amp;nbsp; minutes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;(timestamp - Previous(timestamp))* 1440. // Multiply by #minutes in a day&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Num#(Interval(timestamp - Previous(timestamp), 'm')) // Get Interval minutes and convert the text to number&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank" rel="noopener"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank" rel="noopener"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank" rel="noopener"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Nov 2021 17:18:14 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2021-11-01T17:18:14Z</dc:date>
    <item>
      <title>Timestamp to minutes</title>
      <link>https://community.qlik.com/t5/App-Development/Timestamp-to-minutes/m-p/1854255#M70521</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This expression currently returns a timestamp. However, I am trying to convert the following script expression in to total number of minutes so I can then divide this by a number of moves as a productivity measure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF(operator_name = PREVIOUS(operator_name) AND type_description = 'UNAV' AND PREVIOUS(type_description) &amp;lt;&amp;gt; 'UNAV' and che_name = previous(che_name)&lt;BR /&gt;or operator_name = PREVIOUS(operator_name) AND type_description = 'LGOF' AND PREVIOUS(type_description) &amp;lt;&amp;gt; 'UNAV' and che_name = previous(che_name)&lt;BR /&gt;or operator_name = PREVIOUS(operator_name) AND type_description = 'LGON' AND PREVIOUS(type_description) = 'AVAL' and che_name = previous(che_name),&lt;BR /&gt;interval(timestamp - PREVIOUS(timestamp)),'hh:mm')&amp;amp;' '&amp;amp; date(date#(left(date(Floor([timestamp])),40),'DD/MM/YYYY')), timestamp(timestamp) AS Loggedin&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;However, I am drawing a blank and would really appreciate some help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Derek&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 14:15:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Timestamp-to-minutes/m-p/1854255#M70521</guid>
      <dc:creator>DerekTomps</dc:creator>
      <dc:date>2021-11-01T14:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp to minutes</title>
      <link>https://community.qlik.com/t5/App-Development/Timestamp-to-minutes/m-p/1854349#M70528</link>
      <description>&lt;P&gt;Assuming the field "timestamp" is a proper Qlik datetime -- it appears it is from your example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;timestamp - Previous(timestamp)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;returns the difference as integer number of days and fractional part of a day.&amp;nbsp; You have two choices to convert this to&amp;nbsp; minutes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;(timestamp - Previous(timestamp))* 1440. // Multiply by #minutes in a day&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Num#(Interval(timestamp - Previous(timestamp), 'm')) // Get Interval minutes and convert the text to number&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank" rel="noopener"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank" rel="noopener"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank" rel="noopener"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 17:18:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Timestamp-to-minutes/m-p/1854349#M70528</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-11-01T17:18:14Z</dc:date>
    </item>
  </channel>
</rss>

