<?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: count days between dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/1528539#M438583</link>
    <description>&lt;P&gt;Thanks - needed this for my own dashboard so was a lifesaver!&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jan 2019 17:12:14 GMT</pubDate>
    <dc:creator>AT84Qlik</dc:creator>
    <dc:date>2019-01-09T17:12:14Z</dc:date>
    <item>
      <title>count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678102#M245988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, in my expressions, I had:&lt;/P&gt;&lt;P&gt;today() - ArrivalDate and the result was 383.6754...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I did: Num(Date(ArrivalDate, 'DD-MM-YYYY')) to see exactly what number I get.&amp;nbsp; I got 41466.324....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want both of my dates to be integers but I don't know whether to round them up or down.&amp;nbsp; I don't think rounding is the answer otherwise, some days, I could get 1 day out from the rounding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas for novice me, Qliksters?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 07:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678102#M245988</guid>
      <dc:creator />
      <dc:date>2014-07-30T07:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678103#M245989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to use floor function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 07:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678103#M245989</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2014-07-30T07:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678104#M245990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Interval(today() - ArrivalDate,'dd')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Today() - Floor(ArrivalDate)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 07:56:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678104#M245990</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-07-30T07:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678105#M245991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like your ArrivalDate field is actually a date and timestamp, which is why it is giving you the decimal.&lt;/P&gt;&lt;P&gt;If you compare &lt;/P&gt;&lt;P&gt;Num(today())&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;Num(now())&lt;/P&gt;&lt;P&gt;for instance you will see the difference that causes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mohit is right though, if you floor the ArrivalDate and then do your calculation, that should give you the answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 08:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678105#M245991</guid>
      <dc:creator />
      <dc:date>2014-07-30T08:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678106#M245992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure that the arrival date has the same format that today() has. Today has no hours or minutes and ArrivalDate seems to have them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 08:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678106#M245992</guid>
      <dc:creator />
      <dc:date>2014-07-30T08:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678107#M245993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Thanks Manish and Mohit,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Arrival date = 12/08/2013:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For Interval(today() - ArrivalDate,'dd'), I get 351.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;For Floor(Today()) - Floor(ArrivalDate), I get 352.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Using Sql:&amp;nbsp; I get 1.6755 if it's the difference between now and yesterday.&amp;nbsp; Or 1 if I have:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;select sysdate - to_date('29/07/2014', 'DD/MM/YY').&amp;nbsp; And using the Arrival date, I get 352.6788, so Floor must be right.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I use Interval(today() - &amp;lt;yesterday&amp;gt;, 'dd'), I get '01'&amp;nbsp; &amp;lt;-- I would've thought I would get 0 since the above example showed Interval is one less than Floor.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'll read up on Floor and Interval but I think Floor is right - basically, I want to ignore the time and just get the number of days.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 08:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678107#M245993</guid>
      <dc:creator />
      <dc:date>2014-07-30T08:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678108#M245994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joe Simmons,&lt;/P&gt;&lt;P&gt;Won't I need to Floor both today and the ArrivalDate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like as if Floor strips it of the timestamp - which is what I'm after.&amp;nbsp; I don't care what time the Arrival time is - as long as it's before 12 midnight, it's considered yesterday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 08:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678108#M245994</guid>
      <dc:creator />
      <dc:date>2014-07-30T08:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678109#M245995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jose, &lt;/P&gt;&lt;P&gt;You're right - I didn't realise that today() has no hours nor minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It makes sense then to only floor the ArrivalDate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 08:32:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678109#M245995</guid>
      <dc:creator />
      <dc:date>2014-07-30T08:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678110#M245996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No worries glad to be of help, and no (as you've seen from Jose's post) you won't need it for the today() as that is already a date only with no timestamp&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 09:09:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/678110#M245996</guid>
      <dc:creator />
      <dc:date>2014-07-30T09:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: count days between dates</title>
      <link>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/1528539#M438583</link>
      <description>&lt;P&gt;Thanks - needed this for my own dashboard so was a lifesaver!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:12:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-days-between-dates/m-p/1528539#M438583</guid>
      <dc:creator>AT84Qlik</dc:creator>
      <dc:date>2019-01-09T17:12:14Z</dc:date>
    </item>
  </channel>
</rss>

