<?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: Date Condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516363#M437004</link>
    <description>Thank you so much Sunny Bhai.. Thanks just last one point&lt;BR /&gt;&lt;BR /&gt;As you mentioned in point 1 mydate is always 1st of the month..When i convert it to some format i.e. MM-YYYY and give where &amp;gt;= '01-2017' will it work or as you suggested do i need to use Where Period &amp;gt;= MakeDate(2017);</description>
    <pubDate>Tue, 04 Dec 2018 16:11:37 GMT</pubDate>
    <dc:creator>bharatkishore</dc:creator>
    <dc:date>2018-12-04T16:11:37Z</dc:date>
    <item>
      <title>Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516319#M436992</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I have a Date field and the format is 01.01.2011. Now i am&amp;nbsp;converting the date format&amp;nbsp;&amp;nbsp;in script&amp;nbsp;as&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date(Mydate, 'MM-YYYY') as Period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now in data in have data from 2011 and i need only from 2017.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that i am giving condition as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;From qvd where&amp;nbsp;&lt;SPAN&gt;Mydate&amp;gt;= '01-2017'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But for some how it is not working.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please tell me where i am missing..&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bharat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516319#M436992</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-04T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516329#M436995</link>
      <description>&lt;P&gt;First thing... make sure to use MonthStart when you just display MM-YYYY so that the date is converted to the 1st day of the month&lt;/P&gt;&lt;PRE&gt;Date(MonthStart(Mydate), 'MM-YYYY') as Period&lt;/PRE&gt;&lt;P&gt;Next try this&lt;/P&gt;&lt;PRE&gt;Load *
From qvd
Where Period &amp;gt;= MakeDate(2017);&lt;/PRE&gt;&lt;P&gt;Although, this isn't the best way to pull data from QVD, because this isn't going to give you an optimized load... To get optimized load... try something like this&lt;/P&gt;&lt;PRE&gt;LOAD Monthstart(MakeDate(2017), IterNo() - 1) as Period
AutoGenerate 1
While MakeDate(2017), IterNo() - 1 &amp;lt;= MonthEnd(Today());

LOAD *
From qvd
Where Exsits(Period);&lt;/PRE&gt;&lt;P&gt;This will not give you an optimized load.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:42:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516329#M436995</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-04T15:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516345#M436998</link>
      <description>Thank you Sunny Bhai for your reply. But i needed your suggestion .&lt;BR /&gt;&lt;BR /&gt;1) When i have date in this format 01.01.2011. What if i just convert to&lt;BR /&gt;Date(Mydate,'MM-YYYY') and why do i need to use Monthstart.&lt;BR /&gt;&lt;BR /&gt;2) Normally when we have date from 2011 and if i need only from 2017 sometimes when we give where Date&amp;gt;=2017 it works. But now if use Makedate in where condition then only it works. Can you please tell me why?&lt;BR /&gt;Load *&lt;BR /&gt;From qvd&lt;BR /&gt;Where Period &amp;gt;= MakeDate(2017);&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Bharat</description>
      <pubDate>Tue, 04 Dec 2018 15:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516345#M436998</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-04T15:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516353#M437000</link>
      <description>1) 01.01.2011 is okay because it is already a month start, but do you have 21.01.2011? using Date(Mydate,'MM-YYYY') will show 01-2011, but the underlying will still be 21.01.2011. This is why I suggested MonthStart.... but if Mydate is always 1st of the month... then you don't need it.&lt;BR /&gt;&lt;BR /&gt;2) QlikView/Qlik Sense is smart enough to interpret some formats as date (based on your environmental variable... but this Mydate&amp;gt;= '01-2017' is not read as date by Qlik... most likely read as a text... which is why the comparison didn't work. MakeDate() create a date for you</description>
      <pubDate>Tue, 04 Dec 2018 16:04:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516353#M437000</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-04T16:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516355#M437001</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use a date&amp;nbsp;type in your where condition.&lt;/P&gt;&lt;P&gt;Try with&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;... where Mydate &amp;gt;= Date(MakeDate(2017,1,1),'MM-YYYY');&lt;/PRE&gt;&lt;P&gt;Albert&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516355#M437001</guid>
      <dc:creator>albert_guito</dc:creator>
      <dc:date>2018-12-04T16:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516363#M437004</link>
      <description>Thank you so much Sunny Bhai.. Thanks just last one point&lt;BR /&gt;&lt;BR /&gt;As you mentioned in point 1 mydate is always 1st of the month..When i convert it to some format i.e. MM-YYYY and give where &amp;gt;= '01-2017' will it work or as you suggested do i need to use Where Period &amp;gt;= MakeDate(2017);</description>
      <pubDate>Tue, 04 Dec 2018 16:11:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516363#M437004</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-04T16:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516370#M437007</link>
      <description>It won't... unless you tell Qlik to read as date using Date#() function&lt;BR /&gt;where &amp;gt;= Date#('01-2017' , 'MM-YYYY')</description>
      <pubDate>Tue, 04 Dec 2018 16:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516370#M437007</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-04T16:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516374#M437008</link>
      <description>&lt;P&gt;Thank you so much Sunny Bhai.. got it..&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:18:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Condition/m-p/1516374#M437008</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-12-04T16:18:31Z</dc:date>
    </item>
  </channel>
</rss>

