<?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 WeekDay() created as variable in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/WeekDay-created-as-variable-in-script/m-p/352087#M705278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve been playing around with WeekDay(now()) in my incremental loader script for qvds as we’re trying to perform full reloads every Sunday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previously I was using:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LET&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vDayOfWeek&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;()); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;IF&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vDayOfWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 'Sun' &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;THEN &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns false, however when I use:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;IF&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;()) = 'Sun' &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;THEN &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And suddenly it works. I'm just curious as to why this happens, Is there any reason it wouldn't be working as a variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2012 02:17:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-14T02:17:48Z</dc:date>
    <item>
      <title>WeekDay() created as variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/WeekDay-created-as-variable-in-script/m-p/352087#M705278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve been playing around with WeekDay(now()) in my incremental loader script for qvds as we’re trying to perform full reloads every Sunday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previously I was using:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LET&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;vDayOfWeek&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;()); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;IF&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vDayOfWeek)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = 'Sun' &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;THEN &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns false, however when I use:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;IF&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;()) = 'Sun' &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;THEN &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And suddenly it works. I'm just curious as to why this happens, Is there any reason it wouldn't be working as a variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 02:17:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WeekDay-created-as-variable-in-script/m-p/352087#M705278</guid>
      <dc:creator />
      <dc:date>2012-06-14T02:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: WeekDay() created as variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/WeekDay-created-as-variable-in-script/m-p/352088#M705279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to single quote your variable ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If '$(vDayOfWeek)' ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at the document log to understand what's going on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 05:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WeekDay-created-as-variable-in-script/m-p/352088#M705279</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-06-14T05:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: WeekDay() created as variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/WeekDay-created-as-variable-in-script/m-p/352089#M705280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works perfectly and I hadn't even thought to check the document log to resolve it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 06:02:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WeekDay-created-as-variable-in-script/m-p/352089#M705280</guid>
      <dc:creator />
      <dc:date>2012-06-14T06:02:21Z</dc:date>
    </item>
  </channel>
</rss>

