<?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 comparing dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1949923#M1219694</link>
    <description>&lt;P&gt;Hey everyone,&lt;/P&gt;
&lt;P&gt;I'm trying to do something that seems to be simple, but I can't get the dates to ever be equal.&lt;/P&gt;
&lt;P&gt;Here's a simple table:&lt;/P&gt;
&lt;P&gt;PROJECTSTATUS:&lt;BR /&gt;Load PROJECTID,&lt;BR /&gt;PROJECTNUMBER,&lt;BR /&gt;STATUS,&lt;BR /&gt;STATUSUPDATE,&lt;BR /&gt;date(HIDATE, 'M/D/YYYY') as HIDATE,&lt;BR /&gt;Time(HIDATE) as HITIME;&lt;/P&gt;
&lt;P&gt;I want to create a flag that shows 1 or 0 in a table column depending on if the project status was updated this month or not.&amp;nbsp; I can't seem to get the date to match even with something simple like:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;=if( [HIDATE] = '6/27/2022', 1, 0)&amp;nbsp;&lt;/STRONG&gt; or&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;=if([HIDATE] = date(6/27/2022), 1, 0)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;it's always false:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="robstar256_0-1656534165918.png" style="width: 284px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/82973i0F8A1BF9B899EABE/image-dimensions/284x328?v=v2" width="284" height="328" role="button" title="robstar256_0-1656534165918.png" alt="robstar256_0-1656534165918.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate any ideas on how to get these to equate!&amp;nbsp; Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2022 20:25:06 GMT</pubDate>
    <dc:creator>robstar256</dc:creator>
    <dc:date>2022-06-29T20:25:06Z</dc:date>
    <item>
      <title>Problem comparing dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1949923#M1219694</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;
&lt;P&gt;I'm trying to do something that seems to be simple, but I can't get the dates to ever be equal.&lt;/P&gt;
&lt;P&gt;Here's a simple table:&lt;/P&gt;
&lt;P&gt;PROJECTSTATUS:&lt;BR /&gt;Load PROJECTID,&lt;BR /&gt;PROJECTNUMBER,&lt;BR /&gt;STATUS,&lt;BR /&gt;STATUSUPDATE,&lt;BR /&gt;date(HIDATE, 'M/D/YYYY') as HIDATE,&lt;BR /&gt;Time(HIDATE) as HITIME;&lt;/P&gt;
&lt;P&gt;I want to create a flag that shows 1 or 0 in a table column depending on if the project status was updated this month or not.&amp;nbsp; I can't seem to get the date to match even with something simple like:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;=if( [HIDATE] = '6/27/2022', 1, 0)&amp;nbsp;&lt;/STRONG&gt; or&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;=if([HIDATE] = date(6/27/2022), 1, 0)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;it's always false:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="robstar256_0-1656534165918.png" style="width: 284px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/82973i0F8A1BF9B899EABE/image-dimensions/284x328?v=v2" width="284" height="328" role="button" title="robstar256_0-1656534165918.png" alt="robstar256_0-1656534165918.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate any ideas on how to get these to equate!&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 20:25:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1949923#M1219694</guid>
      <dc:creator>robstar256</dc:creator>
      <dc:date>2022-06-29T20:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem comparing dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1949979#M1219695</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/187487"&gt;@robstar256&lt;/a&gt;&amp;nbsp; I used below data as sample for my front end evaluation:&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;Temp:&lt;BR /&gt;Load * inline [&lt;BR /&gt;HIDate&lt;BR /&gt;6/27/2022&lt;BR /&gt;6/25/2022&lt;BR /&gt;6/26/2022&lt;BR /&gt;6/23/2022&lt;BR /&gt;06/22/2022&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Exit Script;&lt;/P&gt;
&lt;P&gt;Backend Expression in the Straight table:&lt;/P&gt;
&lt;P&gt;=if(Date(Date#(HIDate,'MM/DD/YYYY'),'MM/DD/YYYY')=Date('6/27/2022','MM/DD/YYYY'),1,0)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Comparing Dates.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/82990iF781988A751DE97C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Comparing Dates.PNG" alt="Comparing Dates.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 02:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1949979#M1219695</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-06-30T02:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem comparing dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1950402#M1219706</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; that works for the hardcoded date.&amp;nbsp; &amp;nbsp;Now for my real world example, I have a rolling cuttoff date in a variable called vCutOffDate.&amp;nbsp; I was hoping something like this would work, but of course it doesn't match:&lt;/P&gt;
&lt;P&gt;SET &lt;STRONG&gt;vCutOffDate&lt;/STRONG&gt; = MakeDate( Year(Today()), Month(addmonths(max(HIDATE),-1)),27);&amp;nbsp; //&amp;nbsp; =5/27/2022&lt;/P&gt;
&lt;P&gt;=if(Date(Date(HIDATE,'MM/DD/YYYY'),'MM/DD/YYYY') &amp;gt;= Date(Date($(&lt;STRONG&gt;vCutOffDate&lt;/STRONG&gt;),'MM/DD/YYYY'),'MM/DD/YYYY'),1,0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any ideas?&amp;nbsp; Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 15:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1950402#M1219706</guid>
      <dc:creator>robstar256</dc:creator>
      <dc:date>2022-06-30T15:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem comparing dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1950559#M1219712</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/187487"&gt;@robstar256&lt;/a&gt;&amp;nbsp; Any reason why you are hardcoding it to '27', Is your rolling cut off date always 27th of each month? or the last working day?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 04:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1950559#M1219712</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-07-01T04:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem comparing dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1951481#M1219754</link>
      <description>&lt;P&gt;Hi, we have a cutoff on the 27th for project managers to enter updates.&amp;nbsp; &amp;nbsp;Any idea how to make your statement work with a variable?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 17:07:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-comparing-dates/m-p/1951481#M1219754</guid>
      <dc:creator>robstar256</dc:creator>
      <dc:date>2022-07-04T17:07:03Z</dc:date>
    </item>
  </channel>
</rss>

