<?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: Date function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099765#M913286</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;What this expression is doing is as follow&lt;/P&gt;&lt;P&gt;AddMonths(StartDate,FrequencyNum*iterno()-1) &lt;/P&gt;&lt;P&gt;The definition of AddMonth is as follows, AddMonths(StartDate,n,Mode), the Nth represent Month. So FrequencyNum&amp;nbsp; * Iterno() -1, FrequencyNum equals 12 multiply by IterNo().&amp;nbsp; Imagine the IterNo() is (which is Number of iteration, i.e 1 or 2 or 3, suggest Loop) so FrequencyNum * iterno() will evalute to 12 * 1 (or 12 * 3. Whatever the IterNo() is) the final result could be 12 and then the -1 will give a final output of 11 for the Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's put everything together.&lt;/P&gt;&lt;P&gt;AddMonths(StartDate,FrequencyNum * IterNo()-1) is&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;AddMonths ('2003-01-29',11) results to &lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;AddMonths &lt;/SPAN&gt;('2003-11-29'). Then the MonthEnd Function comes in&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;/SPAN&gt;MonthEnd(&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;AddMonths &lt;/SPAN&gt;('2003-11-29') ) results to 2003-11-30 which basically return the month end date. Finally format the result as 'YYYY-MM-DD'. We don't kow what the If function is doing so I can't comment on that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;Hope this helps&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2016 20:41:06 GMT</pubDate>
    <dc:creator>Gabriel</dc:creator>
    <dc:date>2016-05-31T20:41:06Z</dc:date>
    <item>
      <title>Date function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099762#M913283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for ex if my &lt;SPAN style="font-size: 13.3333px;"&gt;StartDate is 8/1/2014 and Frequency num is 12 what is the output from the below expression ? What exactly it is doing ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if((Date(MonthEnd(AddMonths(StartDate,FrequencyNum*iterno()-1)),'YYYY-MM-DD'))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099762#M913283</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099763#M913284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this would create a list of dates like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2014-08-31&lt;/P&gt;&lt;P&gt;2015-08-31&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2016-08-31&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2017-08-31&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;and will stop based on your While Loop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 18:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099763#M913284</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-31T18:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099764#M913285</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;it wouldn't do much because it's not a valid expression.&lt;/P&gt;&lt;P&gt;You failed to post the missing then-expression (and optionally the else-expression too).&lt;/P&gt;&lt;P&gt;The condition as well might not be complete because to interpret the expression you posted numerically would not require the formatting date() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you posted the complete LOAD statement you might get better answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 19:59:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099764#M913285</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-05-31T19:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date function</title>
      <link>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099765#M913286</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;What this expression is doing is as follow&lt;/P&gt;&lt;P&gt;AddMonths(StartDate,FrequencyNum*iterno()-1) &lt;/P&gt;&lt;P&gt;The definition of AddMonth is as follows, AddMonths(StartDate,n,Mode), the Nth represent Month. So FrequencyNum&amp;nbsp; * Iterno() -1, FrequencyNum equals 12 multiply by IterNo().&amp;nbsp; Imagine the IterNo() is (which is Number of iteration, i.e 1 or 2 or 3, suggest Loop) so FrequencyNum * iterno() will evalute to 12 * 1 (or 12 * 3. Whatever the IterNo() is) the final result could be 12 and then the -1 will give a final output of 11 for the Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's put everything together.&lt;/P&gt;&lt;P&gt;AddMonths(StartDate,FrequencyNum * IterNo()-1) is&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;AddMonths ('2003-01-29',11) results to &lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;AddMonths &lt;/SPAN&gt;('2003-11-29'). Then the MonthEnd Function comes in&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;/SPAN&gt;MonthEnd(&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;AddMonths &lt;/SPAN&gt;('2003-11-29') ) results to 2003-11-30 which basically return the month end date. Finally format the result as 'YYYY-MM-DD'. We don't kow what the If function is doing so I can't comment on that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;Hope this helps&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 20:41:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-function/m-p/1099765#M913286</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2016-05-31T20:41:06Z</dc:date>
    </item>
  </channel>
</rss>

