<?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: Difference in Months, between 2 dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1866680#M1216355</link>
    <description>&lt;P&gt;How do you handle A Zero value for Age. From day 1 to day 365/366 is year 0 and anything multipleid by that is 0&lt;/P&gt;
&lt;P&gt;Example: Age('12/31/2021', '1/1/2021') = 0 and 0 * 12 = 0 where you would really want 1 i.e. 12 if you are looking for months&lt;/P&gt;
&lt;P&gt;However&lt;/P&gt;
&lt;P&gt;Age('12/31/2021', '1/1/2020') = 2,&lt;/P&gt;
&lt;P&gt;Also if you are wanting something like 3 months as a time interval this does not work and dividing by 365 will not always work because of leap years.&lt;/P&gt;
&lt;P&gt;Sounds like a DateDiff function should be added just for this purpose so you can specify that you want the interval in Days, Months, Years.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 19:35:10 GMT</pubDate>
    <dc:creator>Spartan27215</dc:creator>
    <dc:date>2021-12-03T19:35:10Z</dc:date>
    <item>
      <title>Difference in Months, between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1760223#M718844</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;I want to calculate, the difference in months between today() and a CommencementDate in Qlik (true qlik date, format DD/MM/YY)&lt;/P&gt;&lt;P&gt;My statement is "'mm'".&amp;nbsp;&lt;/P&gt;&lt;P&gt;if&amp;nbsp;CommencementDate&amp;nbsp; = 12/02/2015, I get 3021120.&amp;nbsp;Obviously thats not right.&lt;/P&gt;&lt;P&gt;if I change the 'mm' to 'M' or 'MM'&amp;nbsp; i get zero....&lt;/P&gt;&lt;P&gt;what am I doing wrong here?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1760223#M718844</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2020-11-20T18:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in Months, between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1760255#M718845</link>
      <description>&lt;P&gt;Hi,I think there is no function to calculate months difference, and interval() function anly allows for days, not months, I would try with something like:&amp;nbsp;=(Age(Today(),&lt;SPAN&gt;CommencementDate&lt;/SPAN&gt;)*12)+(Month(Today())-Month(&lt;SPAN&gt;CommencementDate&lt;/SPAN&gt;))&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 12:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1760255#M718845</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-11-10T12:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in Months, between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1760276#M718846</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've just stumbled on&amp;nbsp; round((interval#(Today()-CommencementDate, 'DD')/30.5)) and that seems to work ok.&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 12:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1760276#M718846</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2020-11-10T12:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in Months, between 2 dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1866680#M1216355</link>
      <description>&lt;P&gt;How do you handle A Zero value for Age. From day 1 to day 365/366 is year 0 and anything multipleid by that is 0&lt;/P&gt;
&lt;P&gt;Example: Age('12/31/2021', '1/1/2021') = 0 and 0 * 12 = 0 where you would really want 1 i.e. 12 if you are looking for months&lt;/P&gt;
&lt;P&gt;However&lt;/P&gt;
&lt;P&gt;Age('12/31/2021', '1/1/2020') = 2,&lt;/P&gt;
&lt;P&gt;Also if you are wanting something like 3 months as a time interval this does not work and dividing by 365 will not always work because of leap years.&lt;/P&gt;
&lt;P&gt;Sounds like a DateDiff function should be added just for this purpose so you can specify that you want the interval in Days, Months, Years.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 19:35:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-in-Months-between-2-dates/m-p/1866680#M1216355</guid>
      <dc:creator>Spartan27215</dc:creator>
      <dc:date>2021-12-03T19:35:10Z</dc:date>
    </item>
  </channel>
</rss>

