<?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 Problem using date in If statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-using-date-in-If-statement/m-p/157446#M32922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to use the following if statement:&lt;/P&gt;&lt;P&gt;If(CalendarMonthAndYear &amp;lt; 'Nov-2009', 'Use sub-cat', 'use FOP').&lt;/P&gt;&lt;P&gt;The CalendarMonthandYear range is developed using the MasterCalendar approach.&lt;/P&gt;&lt;P&gt;When selecting dates in any format (a list box for testing purposes) I get incorrect results - e.g. if I select May-2010, the result is 'Use sub-cat', where it should be 'use FOP'.&lt;/P&gt;&lt;P&gt;Similar errors when selecting other dates.&lt;/P&gt;&lt;P&gt;What is the correct syntax to correctly select all dates before Nov-2009 for a specific action, and everything from Nov-2009 onward for another?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Feb 2010 07:15:03 GMT</pubDate>
    <dc:creator>burgersurfer</dc:creator>
    <dc:date>2010-02-24T07:15:03Z</dc:date>
    <item>
      <title>Problem using date in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-date-in-If-statement/m-p/157446#M32922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to use the following if statement:&lt;/P&gt;&lt;P&gt;If(CalendarMonthAndYear &amp;lt; 'Nov-2009', 'Use sub-cat', 'use FOP').&lt;/P&gt;&lt;P&gt;The CalendarMonthandYear range is developed using the MasterCalendar approach.&lt;/P&gt;&lt;P&gt;When selecting dates in any format (a list box for testing purposes) I get incorrect results - e.g. if I select May-2010, the result is 'Use sub-cat', where it should be 'use FOP'.&lt;/P&gt;&lt;P&gt;Similar errors when selecting other dates.&lt;/P&gt;&lt;P&gt;What is the correct syntax to correctly select all dates before Nov-2009 for a specific action, and everything from Nov-2009 onward for another?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2010 07:15:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-date-in-If-statement/m-p/157446#M32922</guid>
      <dc:creator>burgersurfer</dc:creator>
      <dc:date>2010-02-24T07:15:03Z</dc:date>
    </item>
    <item>
      <title>Problem using date in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-date-in-If-statement/m-p/157447#M32923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;the issue with your code is that you compare against a string. May-2010 is 'smaller' than Nov-2009 because the letter M comes before N in the alphabet. You should really compare dates against dates.&lt;/P&gt;&lt;P&gt;So you should convert calendarMonthandYear to a date and then compare against a date, eg&lt;/P&gt;&lt;P&gt;date(Field, format) &amp;lt; '01.11.2009' [or whatever your default date format is]&lt;/P&gt;&lt;P&gt;Regards, Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2010 07:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-date-in-If-statement/m-p/157447#M32923</guid>
      <dc:creator />
      <dc:date>2010-02-24T07:47:50Z</dc:date>
    </item>
    <item>
      <title>Problem using date in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-date-in-If-statement/m-p/157448#M32924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Lucas, the string was exactly my problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2010 19:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-date-in-If-statement/m-p/157448#M32924</guid>
      <dc:creator>burgersurfer</dc:creator>
      <dc:date>2010-02-24T19:59:04Z</dc:date>
    </item>
  </channel>
</rss>

