<?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: Expression/ Difference Between Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Difference-Between-Dates/m-p/531774#M1124880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you so much for your help!&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jan 2014 14:16:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-19T14:16:43Z</dc:date>
    <item>
      <title>Expression/ Difference Between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Difference-Between-Dates/m-p/531772#M1124878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hi!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I'm trying to create 3 graphics with the a&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;verage of the number of days between two dates within the space of:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;- Graphic 1/Expression 1: from 01.01.2013 to 31.12.2013;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000;"&gt;- Graphic 2/Expression 2&lt;/SPAN&gt;: From 01.06.2013 to 30.09.2013;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000;"&gt;- Graphic 3/Expression 3&lt;/SPAN&gt;: From 16.10.2012 to 10.02.2013;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I make an example of what I'm trying to calculate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Expression 1 - I calcutate only days between this interval from 01.01.2013 to 31.12.2013:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; - When my start date is 28.10.2012 and my end date is 31.03.2013, the difference is 89 days (01.03.13 - 31.03.13);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; - When my start date is 08.09.2013 and my end date is 16.01.2014 the difference is 114 days (08.09.13 - 31.12.13);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; - When my start date is 22.09.2002 and my end date is blank, the difference is 365 days (01.01.13 - 31.12.13);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Expression2 - I calcutate only days between this interval from 01.10.2012 to 28.02.2013:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;- When my start date is 28.10.2012 and my end date is 31.03.2013, the difference is 123 days (28.10.12 - 28.02.13);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; - When my start date is 16.02.2013 and my end date is 16.03.2014 the difference is 12 days (16.02.13 - 28.02.13);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; - When my start date is 22.09.2002 and my end date is blank, the difference is 150 days (01.10.12 - 28.02.13);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;You can find an example attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Do you think it's possible to do?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Any suggestions greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Andrea&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 10:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Difference-Between-Dates/m-p/531772#M1124878</guid>
      <dc:creator />
      <dc:date>2014-01-19T10:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Expression/ Difference Between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Difference-Between-Dates/m-p/531773#M1124879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can start with something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=rangemax(rangemin(makedate(2013,12,31),[End Date])-rangemax(makedate(2013,1,1),[Start Date]) ,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the makedate() functions are defining your reference date intervals (Jan 1st,&amp;nbsp; 2013 to Dec 31, 2013 in this sample). You may need to add 1 (if you want to include the start date in your calculation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use aggregation functions like avg() around (otherwise this expression will only work correctly with unambiguous start and end dates, i.e. selections been made).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 12:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Difference-Between-Dates/m-p/531773#M1124879</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-01-19T12:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Expression/ Difference Between Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Difference-Between-Dates/m-p/531774#M1124880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you so much for your help!&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 14:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Difference-Between-Dates/m-p/531774#M1124880</guid>
      <dc:creator />
      <dc:date>2014-01-19T14:16:43Z</dc:date>
    </item>
  </channel>
</rss>

