<?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 extract month and year from 4 digit numbers</title><link>https://community.appian.com/discussions/f/rules/27067/how-to-extract-month-and-year-from-4-digit-numbers</link><description>for example my input is 0323 and i need output march-2023 (or) 03-2023</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: how to extract month and year from 4 digit numbers</title><link>https://community.appian.com/thread/106367?ContentTypeID=1</link><pubDate>Sun, 08 Jan 2023 05:31:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2ffd7aa8-aa30-4203-81f6-fa4a9d76eb2f</guid><dc:creator>Ram Ganesh</dc:creator><description>&lt;p&gt;thanks for the answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract month and year from 4 digit numbers</title><link>https://community.appian.com/thread/106366?ContentTypeID=1</link><pubDate>Sun, 08 Jan 2023 05:26:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6f5dd385-1d58-4a31-b838-0e65519d8e8d</guid><dc:creator>Ram Ganesh</dc:creator><description>&lt;p&gt;thanks for the answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract month and year from 4 digit numbers</title><link>https://community.appian.com/thread/106256?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 12:43:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8e9fd7a8-fb8e-470f-92b1-ab9288da42be</guid><dc:creator>anshikag8127</dc:creator><description>&lt;p&gt;Pls check the output for local!newDate variable.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!date: &amp;quot;0323&amp;quot;,
  local!newDate: concat(
    left(local!date, 2),
    &amp;quot;-20&amp;quot;,
    right(local!date, 2)
  ),
  local!newDate
),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract month and year from 4 digit numbers</title><link>https://community.appian.com/thread/106254?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 12:39:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:46278753-29ed-4f7b-944c-a21087230089</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/anshikag0001"&gt;anshikag0001&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&amp;#39;0323&amp;#39; is the resultant output. for the code you have given. May be you haven&amp;#39;t copied the complete code here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract month and year from 4 digit numbers</title><link>https://community.appian.com/thread/106253?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 12:35:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae83ae36-bc7e-4d15-84f1-192935324767</guid><dc:creator>anshikag8127</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;You can try this too, Hope it helps&lt;pre class="ui-code" data-mode="text"&gt;local!date:&amp;quot;0323&amp;quot;,
local!newDate:concat(left(local!date,2),&amp;quot;-20&amp;quot;,right(local!date,2)),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract month and year from 4 digit numbers</title><link>https://community.appian.com/thread/106252?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 12:33:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a1706d07-87ab-473e-a966-650f9536ee56</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!input: &amp;quot;0323&amp;quot;,
  local!month: tointeger(index(local!input, { 1, 2 }, {})),
  local!year: tointeger(
    concat(&amp;quot;20&amp;quot;, index(local!input, { 3, 4 }, {}))
  ),
  text(
    date(local!year, local!month, 1),
    &amp;quot;m-yyyy&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can change the value of &amp;quot;m&amp;quot; to &amp;quot;mmm&amp;quot; to print the 3 letters of the month&amp;#39;s name&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract month and year from 4 digit numbers</title><link>https://community.appian.com/thread/106251?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 12:30:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ceaf20a-abfb-4ea8-a034-b380d26423d8</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/ramganeshv6858"&gt;theramganeshvempati&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Try this code and change it according to your requirement. this might do the work. you can also wait for replies&amp;nbsp;with some easy steps from experts.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!value:&amp;quot;0323&amp;quot;,
local!split:a!forEach(
  items: enumerate(len(local!value))+1,
  expression: local!value[fv!item]
  ),
  local!month:tointeger(concat(local!split[1],local!split[2])),
  local!year:tointeger(concat(&amp;quot;20&amp;quot;,local!split[3],local!split[4])),
  {
  text(date(local!year,local!month,1),&amp;quot;mmm-yyyy&amp;quot;)
  }
  )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>