<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to generate month and year starting from specific period till current month and year?</title><link>https://community.appian.com/discussions/f/rules/14592/how-to-generate-month-and-year-starting-from-specific-period-till-current-month-and-year</link><description>Hi All, 
 I want to write an expression rule which should generate output as &amp;quot;January 2016 , February 2016, March 2016,....,January 2017, February 2017,...., till current month year (i.e Mar,2019)&amp;quot;. 
 
 Can somebody help me with this ? 
 
 Thanks in </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to generate month and year starting from specific period till current month and year?</title><link>https://community.appian.com/thread/65428?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 12:34:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb8621bd-445e-4d79-9bac-42010a1fadbf</guid><dc:creator>Anu</dc:creator><description>Hi Stefan, &lt;br /&gt;
&lt;br /&gt;
Thank you for your response . This will definitely help.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate month and year starting from specific period till current month and year?</title><link>https://community.appian.com/thread/65427?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 12:34:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c9ee2413-0ce4-406f-8fc6-32912a6f02ff</guid><dc:creator>Anu</dc:creator><description>Hi Ashvin , &lt;br /&gt;
&lt;br /&gt;
Thank you for your response . This will definitely help.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate month and year starting from specific period till current month and year?</title><link>https://community.appian.com/thread/65426?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 12:33:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e8cd32b8-ea5a-45b2-9fd9-0190a9dc85b0</guid><dc:creator>Anu</dc:creator><description>Hi Mike,&lt;br /&gt;
Starting month/year is known assuming it is January 2016 .&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate month and year starting from specific period till current month and year?</title><link>https://community.appian.com/thread/65410?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 19:40:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fe9d74ca-f9a8-4dbe-a0f8-4768344e433b</guid><dc:creator>Stefan Helzle</dc:creator><description>a!forEach(&lt;br /&gt;
  items: reverse(1 + enumerate(50) * -1),&lt;br /&gt;
  expression: text(&lt;br /&gt;
    eomonth(today(), fv!item),&lt;br /&gt;
    &amp;quot;mmmm yyyy&amp;quot;&lt;br /&gt;
  )&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate month and year starting from specific period till current month and year?</title><link>https://community.appian.com/thread/65407?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 18:22:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bb5f7535-135f-46cd-875a-f7ea53014801</guid><dc:creator>Ashvin Kapur</dc:creator><description>&lt;p&gt;This may not be the most efficient way of doing it, but it should do the job.&amp;nbsp;Set any date as local!startDate (or make it a rule input so you can pass it in to the expression), and this should return a list of month/years including the current month/year. Obviously make any changes you see fit, but this should get you 95% of the way there. Hope this helps!&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!startDate: date(2014, 2, 1),
  local!yearDiff: year(today()) - year(local!startDate),
  local!monthDiffTemp: local!month(today()) - month(local!startDate),
  local!totalMonthDiff: if(
    local!monthDiffTemp &amp;gt; 0,
    12 * local!yearDiff + local!monthDiffTemp + 1,
    12 * (local!yearDiff - 1) + local!monthDiffTemp + 13
  ),
  a!forEach(
    items: enumerate(local!totalMonthDiff),
    expression: with(
      local!date: eomonth(local!startDate, fv!item),
      text(local!date, &amp;quot;MMMM yyyy&amp;quot;)
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate month and year starting from specific period till current month and year?</title><link>https://community.appian.com/thread/65406?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 17:27:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7a2ebd6-454a-44fa-9197-744e91499de4</guid><dc:creator>Mike Schmitt</dc:creator><description>Do you have anything so far that you can share?  Also, how will you specify the starting month/year?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>