<?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: Difference between two timestamp in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379414#M494813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Try this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Interval&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('04-08-2012 05:11:11 PM', 'DD-MM-YYYY hh:mm:ss tt')) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;('04-08-2012 05:12:11 AM', 'DD-MM-YYYY hh:mm:ss tt'))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;will give you result as 11:59:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2012 11:01:12 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2012-08-21T11:01:12Z</dc:date>
    <item>
      <title>Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379410#M494809</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 am facing a problem in QV11 to figure out the difference between two timestamps, for e.g. (column1) 04-08-2012 05:12:11 AM - (column2) 04-08-2012 05:11:11 PM. &lt;/P&gt;&lt;P&gt;Kindly help me out. Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 10:36:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379410#M494809</guid>
      <dc:creator />
      <dc:date>2012-08-21T10:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379411#M494810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this in your script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SET TimestampFormat='DD-MM-YYYY hh:mm:ss TT';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;field1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;field2,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;interval(field1-field2) as TimeStampDiff&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM YourTable;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or in a chart expression&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=interval(field1-field2)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 10:49:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379411#M494810</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-21T10:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379412#M494811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Date('04-08-2012 05:12:11','DD-MM-YYYY hh:mm:ss') -Date('04-08-2012 05:11:11','DD-MM-YYYY hh:mm:ss')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 10:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379412#M494811</guid>
      <dc:creator>sreenivas</dc:creator>
      <dc:date>2012-08-21T10:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379413#M494812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Try this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Interval&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('04-08-2012 05:11:11 PM', 'DD-MM-YYYY hh:mm:ss tt')) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;('04-08-2012 05:12:11 AM', 'DD-MM-YYYY hh:mm:ss tt'))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;will give you result as 11:59:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:01:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379413#M494812</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-08-21T11:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379414#M494813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Try this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Interval&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('04-08-2012 05:11:11 PM', 'DD-MM-YYYY hh:mm:ss tt')) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;('04-08-2012 05:12:11 AM', 'DD-MM-YYYY hh:mm:ss tt'))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;will give you result as 11:59:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:01:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379414#M494813</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-08-21T11:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379415#M494814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you sparing your time for this. I think AM PM thing is not used in your answer, even hourly difference need to be tracked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379415#M494814</guid>
      <dc:creator />
      <dc:date>2012-08-21T11:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379416#M494815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice it works if its hardcoded..can we do the same dynamically...?&lt;/P&gt;&lt;P&gt;Thank you very much for your solution and time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:25:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379416#M494815</guid>
      <dc:creator />
      <dc:date>2012-08-21T11:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379417#M494816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes instead of time add the fieldname&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379417#M494816</guid>
      <dc:creator>sreenivas</dc:creator>
      <dc:date>2012-08-21T11:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379418#M494817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;with column name its not giving me correct output &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379418#M494817</guid>
      <dc:creator />
      <dc:date>2012-08-21T11:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379419#M494818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you send the date format of the field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:47:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379419#M494818</guid>
      <dc:creator>sreenivas</dc:creator>
      <dc:date>2012-08-21T11:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379420#M494819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'DD-MM-YYYY hh:mm:ss tt'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379420#M494819</guid>
      <dc:creator />
      <dc:date>2012-08-21T11:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379421#M494820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Date(Date#('Fieldname1','DD-MM-YYYY hh:mm:ss tt'),'DD-MM-YYYY hh:mm:ss tt')-&lt;/P&gt;&lt;P&gt;Date(Date#('Fieldname2','DD-MM-YYYY hh:mm:ss tt'),'DD-MM-YYYY hh:mm:ss tt')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 11:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379421#M494820</guid>
      <dc:creator>sreenivas</dc:creator>
      <dc:date>2012-08-21T11:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379422#M494821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would be helpful if you could tell us what you get and what you expect when using which expression / script snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am mostly repeating my above post (just adding your two sample values to two sample fields), but this still seems to return a reasonable result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SET TimestampFormat='DD-MM-YYYY hh:mm:ss TT';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;column1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;column2,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;interval(column1-column2) as TimeStampDiff&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;column1, column2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;04-08-2012 05:12:11 AM,04-08-2012 05:11:11 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 12:01:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379422#M494821</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-21T12:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379423#M494822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im facing the same problem. Is it possible to remove the AM and take 16:00:00 instead on 4:00:00 PM&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;Mpho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 10:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-timestamp/m-p/379423#M494822</guid>
      <dc:creator />
      <dc:date>2013-08-01T10:59:00Z</dc:date>
    </item>
  </channel>
</rss>

