<?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: Script: Filtering Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Filtering-Dates/m-p/638496#M1088642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way you've done it is fine. Others might prefer to do it on the second load because when the criteria changes (i.e. say from 3000 to 4000), then they would only have to change it in one place (instead of the 3 places during the first load).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other thing you might want to consider is the load time. Perhaps one method would yield a quicker load time than another, but this is something you'll have to test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jun 2014 04:29:06 GMT</pubDate>
    <dc:creator>shawn-qv</dc:creator>
    <dc:date>2014-06-04T04:29:06Z</dc:date>
    <item>
      <title>Script: Filtering Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Filtering-Dates/m-p/638495#M1088641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following code that generates a single table with 3 dates that come from different tables in my data model:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;TMP_LT_ACTIONS:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCOUNT_ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PAY_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; PAYMENTS&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; (&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PAY_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &amp;gt;= 2000 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; (&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PAY_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &amp;lt;= 3000;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;ACCOUNT_ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;SCHEDULED_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 9pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; SCHEDULES&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; (&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;SCHEDULED_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &amp;gt;= 2000 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; (&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;SCHEDULED_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &amp;lt;= 3000;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;ACCOUNT_ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;INSPECTION_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; INSPECTIONS&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; (&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;INSPECTION_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &amp;gt;= 2000 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; (&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;INSPECTION_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &amp;lt;= 3000;&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;NOCONCATENATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;LT_ACTIONS:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 9pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: bold; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;ACCOUNT_ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PAY_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCHEDULED_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INSPECTION_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROWNO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;DATE_KEY&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 9pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; TMP_LT_ACTIONS;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; TMP_LT_ACTIONS;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I create a couple of tables more that use the table LT_ACTIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that from all the dates (&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PAY_DT, &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;SCHEDULED_DT, &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;INSPECTION_DT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;) I have to make a filter for those dates between year 2000 and 3000 (because there are some entry errors where a date is greater than year 3000 and I have to filter those ones).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is where to put the filters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it okay to do it in the first table I use, for every date field, like I did in TMP_LT_ACTIONS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or which is the best way to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 03:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Filtering-Dates/m-p/638495#M1088641</guid>
      <dc:creator />
      <dc:date>2014-06-04T03:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script: Filtering Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Filtering-Dates/m-p/638496#M1088642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way you've done it is fine. Others might prefer to do it on the second load because when the criteria changes (i.e. say from 3000 to 4000), then they would only have to change it in one place (instead of the 3 places during the first load).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other thing you might want to consider is the load time. Perhaps one method would yield a quicker load time than another, but this is something you'll have to test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 04:29:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Filtering-Dates/m-p/638496#M1088642</guid>
      <dc:creator>shawn-qv</dc:creator>
      <dc:date>2014-06-04T04:29:06Z</dc:date>
    </item>
  </channel>
</rss>

