<?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: Weekday function is giving the wrong result in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475995#M686263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; I think you have to set DayNames as&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET DayNames='mo;tu;we;th;fr;sa;su';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2014 15:21:49 GMT</pubDate>
    <dc:creator>bbi_mba_76</dc:creator>
    <dc:date>2014-01-07T15:21:49Z</dc:date>
    <item>
      <title>Weekday function is giving the wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475993#M686261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using the weekday function I get the wrong result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: for&amp;nbsp; 31-12-2013 the result is Sunday instead of Tuesday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script the following lines are included&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET DateFormat='DD-MM-YYYY';&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET DayNames='sa;su;mo;tu;we;th;fr';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the formulaes I tried are (where datum is the date field):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;WeekDay(Datum) &lt;/LI&gt;&lt;LI&gt;date#(WeekDay(Datum),'ddmmyyyy') &lt;/LI&gt;&lt;LI&gt;date#(WeekDay(Datum),'www') &lt;/LI&gt;&lt;LI&gt;date#(WeekDay(Datum),'dd-mm-yyyy')&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;All giving the same wrong result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:14:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475993#M686261</guid>
      <dc:creator />
      <dc:date>2014-01-07T15:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday function is giving the wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475994#M686262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are already telling it how to interpret the dates with the SET statement, perhaps just try using the date() format function vs the date#() which is an interpreter.&amp;nbsp; Otherwise I'd say try nesting the date#() function inside of the date() function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="445.41688373565665" data-font-name="g_font_259_0" dir="ltr" style="font-size: 12.5654px; font-family: sans-serif;"&gt;From a technical brief posted on the community...&lt;BR /&gt;"It is often practical to nest an interpretation function inside a formatting function, e.g.&lt;/P&gt;&lt;P data-angle="0" data-canvas-width="329.463741016388" data-font-name="g_font_259_0" dir="ltr" style="font-size: 12.5654px; font-family: sans-serif;"&gt;Date( Date#( DateField, 'M/D/YY'), 'YYYY-MM-DD') as Date &lt;/P&gt;&lt;P data-angle="0" data-canvas-width="453.65975994110113" data-font-name="g_font_259_0" dir="ltr" style="font-size: 12.5654px; font-family: sans-serif;"&gt;The inner function ensures that the input text is interpreted correctly – so that a serial &lt;/P&gt;&lt;P data-angle="0" data-canvas-width="481.3035520935061" data-font-name="g_font_259_0" dir="ltr" style="font-size: 12.5654px; font-family: sans-serif;"&gt;number representing the date is created. The outer function ensures that the serial number &lt;/P&gt;&lt;P data-angle="0" data-canvas-width="190.06363640785213" data-font-name="g_font_259_0" dir="ltr" style="font-size: 12.5654px; font-family: sans-serif;"&gt;is displayed in a correct date format."&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/previewBody/3102-102-4-4191/DateFields-TechBrief-US_v2.pdf" title="http://community.qlik.com/servlet/JiveServlet/previewBody/3102-102-4-4191/DateFields-TechBrief-US_v2.pdf"&gt;&lt;BR /&gt;http://community.qlik.com/servlet/JiveServlet/previewBody/3102-102-4-4191/DateFields-TechBrief-US_v2.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475994#M686262</guid>
      <dc:creator />
      <dc:date>2014-01-07T15:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday function is giving the wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475995#M686263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; I think you have to set DayNames as&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET DayNames='mo;tu;we;th;fr;sa;su';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475995#M686263</guid>
      <dc:creator>bbi_mba_76</dc:creator>
      <dc:date>2014-01-07T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday function is giving the wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475996#M686264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, so easy can it be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475996#M686264</guid>
      <dc:creator />
      <dc:date>2014-01-07T15:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday function is giving the wrong result</title>
      <link>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475997#M686265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The order of the days are bad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET DayNames='mo;tu;we;th;fr;sa;su';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weekday-function-is-giving-the-wrong-result/m-p/475997#M686265</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2014-01-07T15:40:09Z</dc:date>
    </item>
  </channel>
</rss>

