<?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: Months Between 2 dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494902#M185096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Pierre, this seems to be working like I'm needing it too.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jan 2014 19:42:04 GMT</pubDate>
    <dc:creator>bronsonelliott</dc:creator>
    <dc:date>2014-01-13T19:42:04Z</dc:date>
    <item>
      <title>Months Between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494898#M185092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to calculate the months between 2 dates similar to the Oracle 'MONTHS_BETWEEN' function (&lt;A href="http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions089.htm" title="http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions089.htm"&gt;MONTHS_BETWEEN&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen a few examples in the forums similar to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Num#(Year(Date1)&amp;amp;Month(Date1))-Num#(Year(Date2)&amp;amp;Month(Date2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this isn't performing the way I'm needing.&amp;nbsp; For example, if I feed it a start date of 1/15/2012 and an end date of 2/14/2012, it returns a value of '1'.&amp;nbsp; I would expect it to return 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Here's what I'm trying to accomplish, if the start date is 1/15/2012 and the end date is 2/14/2012, the months between would be zero.&amp;nbsp; However, if the dates are 1/15/2012 and 2/15/2012, then the months between would be 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I hope this makes sense.&amp;nbsp; Any help is appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 16:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494898#M185092</guid>
      <dc:creator>bronsonelliott</dc:creator>
      <dc:date>2014-01-10T16:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Months Between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494899#M185093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elliott&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doi you want just generate dates for a calendar table or do you need to feed blanks between 2 dates but many times in the same table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 14:13:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494899#M185093</guid>
      <dc:creator />
      <dc:date>2014-01-13T14:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Months Between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494900#M185094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;A possible way:&lt;/P&gt;&lt;P&gt;= (year(Date2)-year(Date1))*12 + num(month(Date2)) - num(month(Date1)) + (day(Date2)&amp;lt;day(Date1))&lt;/P&gt;&lt;P&gt;Counting the number of monthes and eventually adding a boolean of -1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 14:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494900#M185094</guid>
      <dc:creator />
      <dc:date>2014-01-13T14:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Months Between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494901#M185095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/130387"&gt;Bronson Elliott&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(BigggerDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-SmallerDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/30,1,1) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;This gives you the number of months between two dates. One month is taken as 30 Days. If you need to check some exceptional dates condition, you can add in if statement.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 14:39:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494901#M185095</guid>
      <dc:creator />
      <dc:date>2014-01-13T14:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Months Between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494902#M185096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Pierre, this seems to be working like I'm needing it too.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 19:42:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Months-Between-2-dates/m-p/494902#M185096</guid>
      <dc:creator>bronsonelliott</dc:creator>
      <dc:date>2014-01-13T19:42:04Z</dc:date>
    </item>
  </channel>
</rss>

