<?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 IF Statement with Greater Than, Less Than Dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/IF-Statement-with-Greater-Than-Less-Than-Dates/m-p/19821#M1315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;Need some help on an IF statement where I am trying to categorize a line item based on an date column in the data. I want to create three different buckets based on the current day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the date column (End Date) I am using is less than today's date, I want that line to be marked 'Expired'. If the (End Date) is greater than today's date and less than 90 days after today's date, i want to mark it 'Expiring'. If the (End Date) is greater than 90 days from today's date, i want to mark it 'Active'.&amp;nbsp; Here is the expression i currently have been playing with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([End Date] &amp;lt; 'Date(Today(), M/D/YYYY)', 'Expired', IF([End Date] &amp;gt;= 'Date(Today(), M/D/YYYY)' and [End Date] &amp;lt;= 'Date(Today()+90, M/D/YYYY))', 'Expiring', IF([End Date] &amp;gt; 'Date(Today()+90, M/D/YYYY))', 'Active', 'Null')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure i am missing something simple, but need some fresh eyes to help me i think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2018 21:18:33 GMT</pubDate>
    <dc:creator>andrew_sell</dc:creator>
    <dc:date>2018-04-25T21:18:33Z</dc:date>
    <item>
      <title>IF Statement with Greater Than, Less Than Dates</title>
      <link>https://community.qlik.com/t5/App-Development/IF-Statement-with-Greater-Than-Less-Than-Dates/m-p/19821#M1315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;Need some help on an IF statement where I am trying to categorize a line item based on an date column in the data. I want to create three different buckets based on the current day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the date column (End Date) I am using is less than today's date, I want that line to be marked 'Expired'. If the (End Date) is greater than today's date and less than 90 days after today's date, i want to mark it 'Expiring'. If the (End Date) is greater than 90 days from today's date, i want to mark it 'Active'.&amp;nbsp; Here is the expression i currently have been playing with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([End Date] &amp;lt; 'Date(Today(), M/D/YYYY)', 'Expired', IF([End Date] &amp;gt;= 'Date(Today(), M/D/YYYY)' and [End Date] &amp;lt;= 'Date(Today()+90, M/D/YYYY))', 'Expiring', IF([End Date] &amp;gt; 'Date(Today()+90, M/D/YYYY))', 'Active', 'Null')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure i am missing something simple, but need some fresh eyes to help me i think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 21:18:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-Statement-with-Greater-Than-Less-Than-Dates/m-p/19821#M1315</guid>
      <dc:creator>andrew_sell</dc:creator>
      <dc:date>2018-04-25T21:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement with Greater Than, Less Than Dates</title>
      <link>https://community.qlik.com/t5/App-Development/IF-Statement-with-Greater-Than-Less-Than-Dates/m-p/19822#M1316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't put single quotes around this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date(Today(), M/D/YYYY)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 23.4126px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do put quotes around the format string:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 23.4126px;"&gt; &lt;SPAN style="font-size: 10pt;"&gt; Date(Today(), 'M/D/YYYY')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 23.4126px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the [End Date] field is a true date field then this should be sufficient:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( [End Date] = Today() , .......&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 23.4126px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 23.4126px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 01:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-Statement-with-Greater-Than-Less-Than-Dates/m-p/19822#M1316</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-04-26T01:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement with Greater Than, Less Than Dates</title>
      <link>https://community.qlik.com/t5/App-Development/IF-Statement-with-Greater-Than-Less-Than-Dates/m-p/19823#M1317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be simplify your statement to just this (adding to what &lt;A href="https://community.qlik.com/people/petter-s"&gt;petter-s&lt;/A&gt;‌ said)....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;If([End Date] &amp;lt; Today(), 'Expired',&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If([End Date] &amp;lt;= Today()+90, 'Expiring',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;If([End Date] &amp;gt; Today()+90, 'Active', 'Null')))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 11:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-Statement-with-Greater-Than-Less-Than-Dates/m-p/19823#M1317</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-26T11:12:32Z</dc:date>
    </item>
  </channel>
</rss>

