<?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 problem with number of days in february 2011 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302372#M500760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this expression, to calculate the difference of days between two dates : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DayNumberOfYear([Date_de_fin])- DayNumberOfYear([Date_de_creation])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works well, expect for february. e.g. for QV there is 15 days between the 19th of february 2011 and the 5th of march.I and excel count 14 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I using the wrong expression ? Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : I'm using QV 10 and the date format I use is DD/MM/YYYY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 May 2011 15:49:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-16T15:49:10Z</dc:date>
    <item>
      <title>problem with number of days in february 2011</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302372#M500760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this expression, to calculate the difference of days between two dates : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DayNumberOfYear([Date_de_fin])- DayNumberOfYear([Date_de_creation])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works well, expect for february. e.g. for QV there is 15 days between the 19th of february 2011 and the 5th of march.I and excel count 14 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I using the wrong expression ? Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : I'm using QV 10 and the date format I use is DD/MM/YYYY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 15:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302372#M500760</guid>
      <dc:creator />
      <dc:date>2011-05-16T15:49:10Z</dc:date>
    </item>
    <item>
      <title>problem with number of days in february 2011</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302373#M500761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why this is happening for you, but why don't you straight to the date difference: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;([Date_de_fin])- ([Date_de_creation])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 16:08:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302373#M500761</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-16T16:08:17Z</dc:date>
    </item>
    <item>
      <title>problem with number of days in february 2011</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302374#M500762</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;try Num()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With two variables defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set vDay1='19/02/2011';&lt;/P&gt;&lt;P&gt;set vDay2='05/03/2011';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got 15 using this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=DayNumberOfYear('$(vDay2)')-DayNumberOfYear('$(vDay1)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and 14 using this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num('$(vDay2)')-num('$(vDay1)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;probably linked to the first using/expecting a timestamp and the 2nd a number. But I don't know for sure. If your fields Date_de_Fin and Date_de_creation are timstamps use floor() to make them into numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 16:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302374#M500762</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-16T16:17:42Z</dc:date>
    </item>
    <item>
      <title>problem with number of days in february 2011</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302375#M500763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to you two for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was not using ([Date_de_fin])- ([Date_de_creation]) because I have some empty fields. But in fact it's the best way, so I manage to avoide calculating the expression when the field is NULL and it works now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DayNumberOfYear is using 366 days years, so that's why february has always 29 days, even when it should'nt ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now to check if it works betwen two different year, but it should be ok. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank a lot for you answers.&lt;/P&gt;&lt;P&gt;Enjoy&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2011 08:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-number-of-days-in-february-2011/m-p/302375#M500763</guid>
      <dc:creator />
      <dc:date>2011-05-17T08:11:49Z</dc:date>
    </item>
  </channel>
</rss>

