<?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: Date as variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-as-variable/m-p/1893546#M1217404</link>
    <description>&lt;P&gt;Thanks for the quick reply and good solution.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Feb 2022 07:57:10 GMT</pubDate>
    <dc:creator>HPW</dc:creator>
    <dc:date>2022-02-16T07:57:10Z</dc:date>
    <item>
      <title>Date as variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-as-variable/m-p/1892596#M1217361</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm setting in a script todays date as variable by using vLastRun=today(). In the list of variables the definition of the variable shows 14.02.2022, but .2022 of the definition is underlined in red. In the further script the usage of that variable leads to a syntax error. Already setting a new variable with the value of the first one by using vLastRun2=$(vLastRun) leads to the syntax error. Using the variable in a WHERE-clause is also not working.&lt;/P&gt;
&lt;P&gt;It seems that the variable is not identified as date.&lt;/P&gt;
&lt;P&gt;How I have to handle a variable to be used as date?&lt;/P&gt;
&lt;P&gt;I guess there is as always an easy solution that I have not in mind as new user of QlikView.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:31:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-as-variable/m-p/1892596#M1217361</guid>
      <dc:creator>HPW</dc:creator>
      <dc:date>2022-02-14T14:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date as variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-as-variable/m-p/1892618#M1217362</link>
      <description>&lt;P&gt;The statement&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Let vLastRun=today()&lt;BR /&gt;will indeed assign a variable the date value. But then you need to use it properly.&lt;/P&gt;&lt;P&gt;The $(...) construction is a macro expansion, which means that if you write&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Let vLastRun2=$(vLastRun);&lt;BR /&gt;the parser will see&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Let vLastRun2=14.02.2022;&lt;BR /&gt;which is an incorrect syntax.&lt;/P&gt;&lt;P&gt;Try&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Let vLastRun2=$(#vLastRun); // Force numeric value&lt;BR /&gt;or&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Let vLastRun2='$(vLastRun)';&lt;BR /&gt;or&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Let vLastRun2=vLastRun;&lt;BR /&gt;or&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Let vLastRun2=Num(vLastRun);&lt;/P&gt;&lt;P&gt;See more on&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Why-don-t-my-dates-work/ba-p/1465849" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Why-don-t-my-dates-work/ba-p/1465849&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Data-Types-in-QlikView/ba-p/1474977" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Data-Types-in-QlikView/ba-p/1474977&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:59:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-as-variable/m-p/1892618#M1217362</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2022-02-14T14:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date as variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-as-variable/m-p/1893546#M1217404</link>
      <description>&lt;P&gt;Thanks for the quick reply and good solution.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 07:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-as-variable/m-p/1893546#M1217404</guid>
      <dc:creator>HPW</dc:creator>
      <dc:date>2022-02-16T07:57:10Z</dc:date>
    </item>
  </channel>
</rss>

