<?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 Last 4 hours in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Last-4-hours/m-p/1945009#M77882</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to calculate last 4 hours in script, but it's not working. I have the following expressions:&lt;/P&gt;
&lt;P&gt;MinMaxDate:&lt;/P&gt;
&lt;P&gt;LOAD&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Max(TimeStamp(STAMP)) as MaxDate&lt;/P&gt;
&lt;P&gt;Resident Table;&lt;/P&gt;
&lt;P&gt;LET vMaxDate = peek ('MaxDate', 0, 'MinMaxDate');&lt;/P&gt;
&lt;P&gt;FilterCalendar:&lt;/P&gt;
&lt;P&gt;LOAD distinct&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STAMP&lt;/P&gt;
&lt;P&gt;Resident Table&lt;/P&gt;
&lt;P&gt;Where $(vMaxDate) - timestamp(STAMP) &amp;lt;4/24;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 10:53:20 GMT</pubDate>
    <dc:creator>TeodoraBurlica</dc:creator>
    <dc:date>2022-06-17T10:53:20Z</dc:date>
    <item>
      <title>Last 4 hours</title>
      <link>https://community.qlik.com/t5/App-Development/Last-4-hours/m-p/1945009#M77882</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to calculate last 4 hours in script, but it's not working. I have the following expressions:&lt;/P&gt;
&lt;P&gt;MinMaxDate:&lt;/P&gt;
&lt;P&gt;LOAD&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Max(TimeStamp(STAMP)) as MaxDate&lt;/P&gt;
&lt;P&gt;Resident Table;&lt;/P&gt;
&lt;P&gt;LET vMaxDate = peek ('MaxDate', 0, 'MinMaxDate');&lt;/P&gt;
&lt;P&gt;FilterCalendar:&lt;/P&gt;
&lt;P&gt;LOAD distinct&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STAMP&lt;/P&gt;
&lt;P&gt;Resident Table&lt;/P&gt;
&lt;P&gt;Where $(vMaxDate) - timestamp(STAMP) &amp;lt;4/24;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 10:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Last-4-hours/m-p/1945009#M77882</guid>
      <dc:creator>TeodoraBurlica</dc:creator>
      <dc:date>2022-06-17T10:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Last 4 hours</title>
      <link>https://community.qlik.com/t5/App-Development/Last-4-hours/m-p/1945110#M77889</link>
      <description>&lt;P&gt;It all depends on how the data looks...&lt;/P&gt;&lt;P&gt;But the most probable cause, is that vMaxDate is formatted as a timestamp, and then your dollar expansion will cause problems:&lt;BR /&gt;... Where $(vMaxDate) - timestamp(STAMP) &amp;lt;4/24;&lt;BR /&gt;probably expands to something like&lt;BR /&gt;... Where 2022-06-20 13:14:15 - timestamp(STAMP) &amp;lt;4/24;&lt;BR /&gt;which will give an error.&lt;/P&gt;&lt;P&gt;Try single quotes:&lt;BR /&gt;... Where '$(vMaxDate)' - STAMP &amp;lt;4/24;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 14:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Last-4-hours/m-p/1945110#M77889</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2022-06-17T14:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Last 4 hours</title>
      <link>https://community.qlik.com/t5/App-Development/Last-4-hours/m-p/1945119#M77890</link>
      <description>&lt;P&gt;It works! Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 14:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Last-4-hours/m-p/1945119#M77890</guid>
      <dc:creator>TeodoraBurlica</dc:creator>
      <dc:date>2022-06-17T14:51:04Z</dc:date>
    </item>
  </channel>
</rss>

