<?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: How to calculate difference between timestamps? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738485#M1080935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I posted this question in the wrong section. I wanted to solve this in the front-end and not in the script. Could you provide me with a solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jul 2014 09:12:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-09T09:12:11Z</dc:date>
    <item>
      <title>How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738483#M1080933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 tables with timestamp values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;[Meldingen]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; AutoNumber(JOB_NR) as %Melding.ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; AutoNumber(JOB_CONTRACT_NR) as %Locatie.ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; AutoNumber(JOB_SAP_REF_NR) as %SAP.ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; JOB_NR as [Melding.Nummer],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Date(Floor(JOB_DATE)) as [Melding.Datum gemeld],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Time(Frac(JOB_DATE)) as [Melding.Tijd gemeld],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;TimeStamp(JOB_DATE, 'DD-MM-YYYY hh:mm:ss') as [Melding.Moment gemeld],&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; JOB_DESC as [Melding.Omschrijving],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF( IsNull(JOB_STATUS_NR), 'Onbehandeld',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF( (JOB_STATUS_NR) = 'O3', 'Open staand',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF( (JOB_STATUS_NR) = 'O5', 'Afgehandeld',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF( (OIB_WorkFlowStatus) = 'status0',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; 'Afgehandeld mail', '&amp;lt;Onbekende status&amp;gt;')))) as [Melding.Status],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ApplyMap('Map_Melding.Prioriteit', JOB_PRIORITY_NR) as [Melding.Prioriteit];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// TODO, samenvoegen!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; AutoNumber(JOBCALL_JOB_NR) as %Melding.ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; JOBCALL_JOB_NR as [Melding.Nummer SMV],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Date(Floor(JOBCALL_CALL_DATE)) as [Melding.Datum verstuurd],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Time(Frac(JOBCALL_CALL_DATE)) as [Melding.Tijd verstuurd],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt; Timestamp(JOBCALL_CALL_DATE, 'DD-MM-YYYY hh:mm:ss') as [Melding.Moment verstuurd],&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Date(Floor(JOBCALL_REACTION_DATE)) as [Melding.Datum geaccepteerd],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Time(Frac(JOBCALL_REACTION_DATE)) as [Melding.Tijd geaccepteerd],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Timestamp(JOBCALL_REACTION_DATE, 'DD-MM-YYYY hh:mm:ss') as [Melding.Moment geaccepteerd];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the difference between the two values colored in blue in hours. As you can see I explicitely converted them to timestamps. When I check at the selection box, I see indeed the format 'DD-MM-YYY'. I did the following in a text object:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;=Interval(([Melding.Moment verstuurd] - [Melding.Moment gemeld]),'hh')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;However, this doesn't show the value in the text object. What am I doing wrong?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Nazeem Soeltan&#xD;
&#xD;
Added sample file (with removed sql queries and connction strings)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 09:01:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738483#M1080933</guid>
      <dc:creator />
      <dc:date>2014-07-09T09:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738484#M1080934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nazeem&lt;/P&gt;&lt;P&gt;Please try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&amp;nbsp; *, if(FieldName, interval(Timestamp(Time,'hh:mm:ss[.fff] TT'))-(Timestamp(925/2400,'h:mm:ss TT'))) as TimeLate;&lt;/P&gt;&lt;P&gt;//LOAD *, If(Num(FieldaAme)&amp;gt;Num(Time#('9:15:00 AM','hh:mm:ss[.fff] TT')),1) as FeieldNAme;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 09:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738484#M1080934</guid>
      <dc:creator>noman212</dc:creator>
      <dc:date>2014-07-09T09:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738485#M1080935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I posted this question in the wrong section. I wanted to solve this in the front-end and not in the script. Could you provide me with a solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 09:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738485#M1080935</guid>
      <dc:creator />
      <dc:date>2014-07-09T09:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738486#M1080936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u pls upload ur sample file here so can i assist u more eaisly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 09:23:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738486#M1080936</guid>
      <dc:creator>noman212</dc:creator>
      <dc:date>2014-07-09T09:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738487#M1080937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've added the sample file in the first post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 09:30:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738487#M1080937</guid>
      <dc:creator />
      <dc:date>2014-07-09T09:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738488#M1080938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that there are multiple values of the two fields when the expression is being calculated. To do this in a text box you will need aggregation functions (Min(), Max, Avg()) or a set expression or a manual selection that limits the fields to one unique value each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Interval(Max([Melding.Moment verstuurd]) - Max([Melding.Moment gemeld])),'hh')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or as an expression in a chart/table where &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;Melding.Nummer&lt;/SPAN&gt; and/or &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13.333333969116211px;"&gt;[Melding.Nummer SMV]&lt;/SPAN&gt; are dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 09:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738488#M1080938</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-07-09T09:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738489#M1080939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THank you! And what should I do when I want to calculate the average of that calculated difference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 09:36:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738489#M1080939</guid>
      <dc:creator />
      <dc:date>2014-07-09T09:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate difference between timestamps?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738490#M1080940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depends whether there is one distinct value for [Melding.Nummer] and [Melding.Nummer SMV] for each distinct value of %Melding.ID. If so, then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Interval(Avg(Aggr([Melding.Moment verstuurd] - [Melding.Moment gemeld], [%Melding.ID.])),'hh')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are multiple values, then you need to explain how to get single values for the two fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 07:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-difference-between-timestamps/m-p/738490#M1080940</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-07-10T07:20:58Z</dc:date>
    </item>
  </channel>
</rss>

