<?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: Finding months between two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811029#M1034001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try something like this... using makedate() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(month(makedate(left(201505,4),Right(201505,2),1)))-num(MONTH(date#('01/01/2015','DD/MM/YYYY')))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jan 2015 12:16:39 GMT</pubDate>
    <dc:creator>PradeepReddy</dc:creator>
    <dc:date>2015-01-19T12:16:39Z</dc:date>
    <item>
      <title>Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811024#M1033995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am struggling to solve my problem and would appreciate some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two date fields which are formatted differently in my source data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One is a notification date which is formatted like so 01/01/2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other is report month which is formatted like this 201505&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i need to find out the months between the two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it would be 4 months for the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am hoping to work this out in the script as i want the answer to be a filed which i can use in my data and also create another field in my script which would be banding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 11:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811024#M1033995</guid>
      <dc:creator />
      <dc:date>2015-01-19T11:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811025#M1033997</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 LIKE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;mONTH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(201505,'YYYYMM'))-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MONTH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('01/01/2015','DD/MM/YYYY')) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 11:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811025#M1033997</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-01-19T11:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811026#M1033998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Thanks for the answer, Unfortunately that doesn't work. The date which is actually formatted like 201505 is text not an actual date. So there is no code actually behind the text so as to do the sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think what i will have to do is take the month and the year off the 201505 and create a date by sticking a 01&amp;nbsp; in front of it like 01/05/2015 then do the sum.. Im struggling with the formula though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 11:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811026#M1033998</guid>
      <dc:creator />
      <dc:date>2015-01-19T11:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811027#M1033999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;TRY LIKE&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Num(Month(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(201505,'YYYYMM')))-Num(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MONTH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('01/01/2015','DD/MM/YYYY')))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Kiran&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 12:02:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811027#M1033999</guid>
      <dc:creator>kiranmanoharrode</dc:creator>
      <dc:date>2015-01-19T12:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811028#M1034000</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;If it is text then Month(Date#(datefield,'YYYYMM')) will definately work for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also try with right(datefield,2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 12:05:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811028#M1034000</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-01-19T12:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811029#M1034001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try something like this... using makedate() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(month(makedate(left(201505,4),Right(201505,2),1)))-num(MONTH(date#('01/01/2015','DD/MM/YYYY')))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 12:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811029#M1034001</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2015-01-19T12:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811030#M1034002</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 below code in script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&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;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ReportDates&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NotificationDates&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Months&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NotificationDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'DD/MM/YYYY'),'DD/MM/YYYY') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NotificationDates&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;makedate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ReportDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,4),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ReportDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,2),1),'DD/MM/YYYY') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ReportDates&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[ReportDate,NotificationDate&lt;BR /&gt; 201505,01/01/2015&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 12:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811030#M1034002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-19T12:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811031#M1034003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help with this... i have found the answer...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY') as newdate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 15:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811031#M1034003</guid>
      <dc:creator />
      <dc:date>2015-01-19T15:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Finding months between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811032#M1034004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am now having a problem banding the above result. So i have found out how many working days between the two dates above.. but now i want to band the results by months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So 0-6mts, 6-12mths, 12-18mts, 18-24mts, 24-36mts, &amp;gt;36mts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my script but im getting errors say you are only allowed 3 if conditions.. I didnt know that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;lt;=6,'0-6mts',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;gt;6 and if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;lt;=12,'6-12mts',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;gt;12 and if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;lt;=18,'12-18mts',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;gt;18 and if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;lt;=24,'18-24mts',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;gt;24 and if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;lt;=36,'24-36',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(NetWorkDays(Notificationdate,Date#('01'&amp;amp;'/'&amp;amp; right(ReportMonth,2)&amp;amp;'/' &amp;amp; left(ReportMonth,4),'DD/MM/YYYY'))/30 &amp;gt;36,'&amp;gt;36mts','Error'))))))) as Banding&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 15:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-months-between-two-dates/m-p/811032#M1034004</guid>
      <dc:creator />
      <dc:date>2015-01-19T15:09:23Z</dc:date>
    </item>
  </channel>
</rss>

