<?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 Re: Adding variable date field to an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613682#M1108080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please, replace your '06/03/2014' with '$(vToday)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set a Variable in script:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_139419282720617" jivemacro_uid="_139419282720617" modifiedtitle="true"&gt;
&lt;P&gt;SET vToday = Date(Today(),'DD/MM/YYYY');&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Tonial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Mar 2014 11:49:14 GMT</pubDate>
    <dc:creator>fernando_tonial</dc:creator>
    <dc:date>2014-03-07T11:49:14Z</dc:date>
    <item>
      <title>Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613676#M1108074</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;I have the following Expression and I would like to replace the hard coded date with a variable vToday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vToday = &lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;())&amp;nbsp;&amp;nbsp; - This is already set as a variable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;FABS&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRADE_TYPE&lt;/SPAN&gt;&lt;SPAN&gt;='Swap' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BS_IND&lt;/SPAN&gt;&lt;SPAN&gt;='Fixed' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;INTERNAL_IND&lt;/SPAN&gt;&lt;SPAN&gt;='-' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FINAL_PRICING_DT&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;='06/03/2014'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PAYMENT_QTY&lt;/SPAN&gt;&lt;SPAN&gt;*(-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRICE1&lt;/SPAN&gt;&lt;SPAN&gt;) , &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRADE_TYPE&lt;/SPAN&gt;&lt;SPAN&gt;='Swap' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BS_IND&lt;/SPAN&gt;&lt;SPAN&gt;='Float A' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;INTERNAL_IND&lt;/SPAN&gt;&lt;SPAN&gt;='-' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FINAL_PRICING_DT&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;='06/03/2014'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PAYMENT_QTY&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRICE2&lt;/SPAN&gt;&lt;SPAN&gt; ,0 ) ))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help with this will be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613676#M1108074</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2014-03-07T11:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613677#M1108075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replace your '06/03/2014' with $(vToday)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:02:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613677#M1108075</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-03-07T11:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613678#M1108076</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;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately that suggestion doesn't work.&amp;nbsp; Am I missing some () further on in the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613678#M1108076</guid>
      <dc:creator>danielnevitt</dc:creator>
      <dc:date>2014-03-07T11:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613679#M1108077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share the App?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:12:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613679#M1108077</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2014-03-07T11:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613680#M1108078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Check the formats of the different dates: I think they must be the same for QV to work properly (that is the case in set analysis)&lt;/P&gt;&lt;P&gt;2) If the format is the same, try to use &lt;STRONG&gt;num&lt;/STRONG&gt;() especially for your variable &lt;STRONG&gt;vToday = num(today())&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613680#M1108078</guid>
      <dc:creator />
      <dc:date>2014-03-07T11:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613681#M1108079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.399999618530273px;"&gt;The Format of FINAL_PRICING_DT and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;vToday should be same.&lt;/SPAN&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;Consider that &lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.399999618530273px;"&gt;FINAL_PRICING_DT&lt;/SPAN&gt; is 'DD-MM-YYYY' and vToday = 'DD/MM/YYYY'&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;Do as below...&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;&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;&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.399999618530273px;"&gt;FINAL_PRICING_DT =&amp;nbsp; {'$(&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.399999618530273px;"&gt;=Date(Date#(vToday,'DD/MM/YYYY'),'DD-MM-YYYY')&lt;/SPAN&gt;)'}&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613681#M1108079</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-07T11:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613682#M1108080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please, replace your '06/03/2014' with '$(vToday)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set a Variable in script:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_139419282720617" jivemacro_uid="_139419282720617" modifiedtitle="true"&gt;
&lt;P&gt;SET vToday = Date(Today(),'DD/MM/YYYY');&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Tonial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:49:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613682#M1108080</guid>
      <dc:creator>fernando_tonial</dc:creator>
      <dc:date>2014-03-07T11:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613683#M1108081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Danel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are u sure the field &lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11px;"&gt;FINAL_PRICING_DT&lt;/SPAN&gt; values are same as the values in defined variable ,&lt;/P&gt;&lt;P&gt;If those are fine ..it works ,You didn't miss anything if u do that..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 11:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613683#M1108081</guid>
      <dc:creator />
      <dc:date>2014-03-07T11:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variable date field to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613684#M1108082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any news of all that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vToday = num(today()) &lt;/STRONG&gt;is certainly the best choice because the variables are not dual (all fields in QV are dual like date, integers but variables are not). By storing an integer with the &lt;STRONG&gt;num&lt;/STRONG&gt;() function, you force the &amp;gt; operator to use the integer part of the date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 17:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-variable-date-field-to-an-expression/m-p/613684#M1108082</guid>
      <dc:creator />
      <dc:date>2014-03-07T17:48:55Z</dc:date>
    </item>
  </channel>
</rss>

