<?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 Date comparison not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601862#M546898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a variable&lt;/P&gt;&lt;P&gt;vCurrPeriodEnd , vCurrPeriodStart date variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VPrevPeriodEnd =if(_CompareType='Year over Year',&lt;/P&gt;&lt;P&gt;date(AddYears(vCurrPeriodEnd,-1))&lt;/P&gt;&lt;P&gt;,date(vCurrPeriodStart-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I am using it like this&lt;/P&gt;&lt;P&gt;Period={"&amp;gt;=$(=$(Daystart(vPrevPeriodStart)))&amp;lt;=$(=$(Daystart(vPrevPeriodEnd)))"}&lt;/P&gt;&lt;P&gt;I am putting this in a Set analysis and its not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2014 09:23:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-05T09:23:09Z</dc:date>
    <item>
      <title>Date comparison not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601862#M546898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a variable&lt;/P&gt;&lt;P&gt;vCurrPeriodEnd , vCurrPeriodStart date variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VPrevPeriodEnd =if(_CompareType='Year over Year',&lt;/P&gt;&lt;P&gt;date(AddYears(vCurrPeriodEnd,-1))&lt;/P&gt;&lt;P&gt;,date(vCurrPeriodStart-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I am using it like this&lt;/P&gt;&lt;P&gt;Period={"&amp;gt;=$(=$(Daystart(vPrevPeriodStart)))&amp;lt;=$(=$(Daystart(vPrevPeriodEnd)))"}&lt;/P&gt;&lt;P&gt;I am putting this in a Set analysis and its not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 09:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601862#M546898</guid>
      <dc:creator />
      <dc:date>2014-03-05T09:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601863#M546899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Period={"&amp;gt;=$(=$(Daystart('vPrevPeriodStart')))&amp;lt;=$(=$(Daystart('vPrevPeriodEnd')))"}&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: 12.800000190734863px;"&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: 12.800000190734863px;"&gt;or &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: 12.800000190734863px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Period = {'&amp;gt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Daystart('vPrevPeriodStart')&lt;/SPAN&gt;) &amp;lt;= $(=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Daystart('vPrevPeriodEnd')&lt;/SPAN&gt;)'}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 09:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601863#M546899</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-05T09:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601864#M546900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formats are same for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Daystart(vPrevPeriodStart)&lt;/SPAN&gt; and Period dimension, if they are not same then convert by using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Date#(Period, "DateFormat")) or Timestamp(TimeStamp#(Period, "DateFormat"))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 09:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601864#M546900</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-03-05T09:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601865#M546901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi anil,&lt;/P&gt;&lt;P&gt;please check your both dates in Text box, look whether both they&amp;nbsp; are in Same format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 09:48:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601865#M546901</guid>
      <dc:creator />
      <dc:date>2014-03-05T09:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601866#M546902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no such things as a date variable in QlikView, as variables do not have data types. That may be part of the problem, as date comparisons in Set Analysis require you to have identical formatting between the field and the comparison value (your variable), which may not match in your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest plugging that formula into the expression of a straight table. Do not give the expression a label, and the expression label will show your formula after dollar sign expansion/text replacement, helping you see how QlikView is evaluating your logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's not enough information about your data, variables, or their values and formatting to definitively answer your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 13:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-not-working/m-p/601866#M546902</guid>
      <dc:creator>msteedle</dc:creator>
      <dc:date>2014-03-06T13:45:50Z</dc:date>
    </item>
  </channel>
</rss>

