<?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 in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310557#M459876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do a daily analisys so in the load script I have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET TodayDate = today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression I compare with the field : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dtimport_formated that is obtained from dtimport in mysql load by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAST(dtimport AS DATE) as dtimport_formated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dtimport is an integer in the format : 20170710&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expression I use is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;dtimport_formated={$(TodayDate)}&amp;gt;}valor_brt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it returns nothing, but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET TodayDate = date(today(),'YYYYMMDD');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then compare it with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum({&amp;lt;dtimport={$(TodayDate)}&amp;gt;}valor_brt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;it works fine, but the date instead of showing dd/MM/YYYY is presented in YYYYMMdd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;can anyone help ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Jul 2017 09:04:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-07-28T09:04:45Z</dc:date>
    <item>
      <title>Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310557#M459876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do a daily analisys so in the load script I have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET TodayDate = today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression I compare with the field : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dtimport_formated that is obtained from dtimport in mysql load by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAST(dtimport AS DATE) as dtimport_formated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dtimport is an integer in the format : 20170710&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expression I use is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;dtimport_formated={$(TodayDate)}&amp;gt;}valor_brt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it returns nothing, but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET TodayDate = date(today(),'YYYYMMDD');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then compare it with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum({&amp;lt;dtimport={$(TodayDate)}&amp;gt;}valor_brt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;it works fine, but the date instead of showing dd/MM/YYYY is presented in YYYYMMdd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;can anyone help ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 09:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310557#M459876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T09:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310558#M459877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since they are different at places in format, once you have to use an extra formatting expression, either in set analysis or when you use the variable somewhere else. I.e. is if you get the variable with integer formatted, you can use date() while use variable somewhere like: =Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(TodayDate)&lt;/SPAN&gt;, 'DD/MM/YYYY'); either way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 09:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310558#M459877</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-07-28T09:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310559#M459878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, it almost works, but it converts 20170701 into 02/07/57125&amp;nbsp; instead of 01/07/2017&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 09:40:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310559#M459878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T09:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310560#M459879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's the format mask&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Date#($(TodayDate), 'YYYYMMDD'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 09:43:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310560#M459879</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-07-28T09:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310561#M459880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using on integer value variable, try like:&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;Date(Date#($(TodayDate), 'YYYYMMDD'), 'DD/MM/YYYY')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 09:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310561#M459880</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-07-28T09:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310562#M459881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, I' tried almost everything (if I've tried everything it would be solved) and still nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the dates appera correct but they do not compare right&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 10:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310562#M459881</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T10:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310563#M459882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then the format in the fields and variables are different. Once they are the same, it will be fixed, but without a sample QVW, there is little else to check exactly where this difference resides.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side note, in the set analysis you also need to format the output to match with the field value format, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; dtimport = &lt;STRONG&gt;{"$(=Date($(TodayDate), 'DD/MM/YYYY'))"}&lt;/STRONG&gt; &amp;gt;} valor_brt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or even easier, use the numeric value instead of the date format in all fields. Also better performing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 10:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310563#M459882</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-07-28T10:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310564#M459883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im using the numeric one right now, and it will suffice, but it really annoys me&amp;nbsp; not being able to do it the way I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot send you the qvw because it contains company data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 10:51:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310564#M459883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T10:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310565#M459884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured as many of us handle sensitive data we cannot share, but without having a real app with real data, the troubleshooting is limited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could put side by side in a tablebox both fields, or in a text object the variable and on the other one value of the field, and see if, for example, one has time and the other only the date, how they display, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 11:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310565#M459884</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-07-28T11:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310566#M459885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the table was a good idea, found some stuff wrong, in the results,&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;Date($(TodayDate)) and $(TodayDate) present 30/12/1899 but htey appear correct in the header&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 12:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310566#M459885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T12:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310567#M459886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That likely means you need to use Date('$(TodayDate)') or '$(TodayDate)' with single quotes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:23:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310567#M459886</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-07-28T14:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310568#M459887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS MIGUEL THATS IT !!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-comparison-in-expression/m-p/1310568#M459887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T14:36:52Z</dc:date>
    </item>
  </channel>
</rss>

