<?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 DayNumberOfYear BUG? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262555#M98843</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have encountered this issue also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using this in the scripting or in the objects themselves? Can you bring in the day of the year from the data source using the native date functions? Is the data coming from a database? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2011 22:12:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-05T22:12:37Z</dc:date>
    <item>
      <title>DayNumberOfYear BUG?</title>
      <link>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262551#M98839</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;I'm using the function DayNumberOfYear and I realized that it count 29th febrary on &lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;non-leap years.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;For example, on 2011, 28th febrary is the day number 59 and first of march is day number 61.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Is there any way to solve this?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Cristian&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 18:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262551#M98839</guid>
      <dc:creator />
      <dc:date>2011-09-14T18:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: DayNumberOfYear BUG?</title>
      <link>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262552#M98840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I don't think it is a bug, because the HELP states:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4 style="background-color: #c0c0c0;"&gt;DayNumberOfYear(&lt;SPAN style="font-style: italic;"&gt;date[,firstmonth]&lt;/SPAN&gt;)&lt;/H4&gt;&lt;P&gt;Returns the day number of the year according to a timestamp with the first millisecond of the first day of the year containing &lt;SPAN style="font-style: italic;"&gt;date&lt;/SPAN&gt;. &lt;STRONG&gt;The function always uses years based on 366 days.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;By specifying a &lt;SPAN style="font-style: italic;"&gt;firstmonth&lt;/SPAN&gt; between 1 and 12 (1 if omitted), the beginning of the year may be moved forward to the first day of any month. If you e.g. want to work with a fiscal year starting March 1, you may specify &lt;SPAN style="font-style: italic;"&gt;firstmonth&lt;/SPAN&gt; = 3.&lt;/P&gt;&lt;H3&gt;Examples:&lt;/H3&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;DayNumberOfYear(&lt;/SPAN&gt;date&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; returns the day number counted from the first of the year.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;DayNumberOfYear(&lt;/SPAN&gt;date,3&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; returns the number of the day as counted from the first of March.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you probably noted, you don't specify a year, so QV takes the "worst case" for calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you could certainly just subtract today()-yearstart(today()) to get the daynumber (maybe adding 1, to start with 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: well, you specify a year giving the date, ok, my mistake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 19:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262552#M98840</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-14T19:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: DayNumberOfYear BUG?</title>
      <link>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262553#M98841</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;Thanks for you quick answer. Your proposed solution much betten that mine.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;However&lt;/SPAN&gt;&lt;/SPAN&gt;, I think if you specified the year (like my case) the funtion should return the correct value. This is the first time I see something like that on a software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thanks for your time.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 20:55:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262553#M98841</guid>
      <dc:creator />
      <dc:date>2011-09-14T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: DayNumberOfYear BUG?</title>
      <link>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262554#M98842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I essentially agree. Probably there ist some kind of need for a calendar day&lt;/P&gt;&lt;P&gt;indexing function, with constant index per calendar day across years.&lt;/P&gt;&lt;P&gt;I personally have not used it.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 03:56:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262554#M98842</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-15T03:56:49Z</dc:date>
    </item>
    <item>
      <title>DayNumberOfYear BUG?</title>
      <link>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262555#M98843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have encountered this issue also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using this in the scripting or in the objects themselves? Can you bring in the day of the year from the data source using the native date functions? Is the data coming from a database? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 22:12:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DayNumberOfYear-BUG/m-p/262555#M98843</guid>
      <dc:creator />
      <dc:date>2011-10-05T22:12:37Z</dc:date>
    </item>
  </channel>
</rss>

