<?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>Date</title><link>https://community.appian.com/discussions/f/new-to-appian/24420/date</link><description>How I can I convert number of months into year?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Date</title><link>https://community.appian.com/thread/94275?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 22:31:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:492bc82f-3818-4705-b6d2-b99cbb170912</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;We still can&amp;#39;t understand what you&amp;#39;re trying to actually accomplish. &amp;nbsp;Maybe give an example of the end result you&amp;#39;d expect given a particular stored procedure result (or 2 such examples)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94267?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 15:45:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ecbbb959-9a81-4d2d-86cb-3bfae4e2656e</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;Am I providing detail?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94254?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 10:59:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf351d94-daf1-4293-bb2c-3eaa4296ae10</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;okay sure.&amp;nbsp; yes I have sp rule which is taking inputs as integer values and giving me output as a integer. so now i am trying to convert those days(6 or 12 or 24 etc) into months and add to date(date may be dd/mm/yy) my code is below&lt;pre class="ui-code" data-mode="text"&gt;/* this is sp rule*/
a!localVariables(

  local!spResult: fn!executestoredprocedure(
    dataSourceName: cons!DATASOURCE_NAME,
    procedureName: cons!SP_MONTHS,
    inputs: {
      {
        name: &amp;quot;CI&amp;quot;,
        value: ri!ci_int,
        
      },
      {
        name: &amp;quot;CODE&amp;quot;,
        value: Code_int,
       
      }
    }
  ),
  
  if(
    
    and(
      local!spResult.success,
      not(
        isnull(
          local!spResult.parameters
        )
      )
    ),
    local!spResult.parameters.MONTHS,
    &amp;quot;&amp;quot;
  )
    
    
  )&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94252?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 10:51:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b887c985-68f9-47b9-8177-f02b08e72521</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Now you&amp;#39;re introducing &amp;quot;days&amp;quot; into the discussion and you have lost me...I don&amp;#39;t understand what you&amp;#39;re trying to achieve. Can you provide more detail please.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94251?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 10:49:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df8b099c-87ef-4c8f-98bf-f120892e3ea4</guid><dc:creator>ajhick</dc:creator><description>&lt;p&gt;I&amp;#39;m still struggling to understand what you need. Does the stored procedure ONLY return 6 months? Does it return 6 months and a date and you want to add the 6 months to the date and end up with another date? We have no idea what you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94250?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 10:21:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:622b59cf-ec6e-4af4-85c6-4aa1ee0b7950</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;yes I have the sp rule in which it is returning me no of months in terms of days(for ex: 6 months or 12 months in 6 or 12),I need to convert that days (6 days into months) with the date, how i can do this? I need do use sp output only.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94249?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 10:18:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0abb7961-e310-43f9-85d2-bf344c3d4f8d</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;this is fine ,but now I have the sp rule in which it is returning no of months fox ex: 6 months. i need to use this 6 or 12 or 24 months with the date&amp;nbsp; and convert into months , how will i do that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94244?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 09:26:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1e3e5297-367f-4bd2-97da-ee4853c23a61</guid><dc:creator>vikashk739</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!months,
  local!year,
  {
    a!textField(
      label: &amp;quot;Enter month&amp;quot;,
      value: local!months,
      saveInto: local!months
    ),
    a!textField(
      label: &amp;quot;Year (s)&amp;quot;,
      value: if(
        or(isnull(local!months)),
        &amp;quot;&amp;quot;,
        quotient(local!months,12) &amp;amp; &amp;quot; year and &amp;quot; &amp;amp; mod(local!months,12) &amp;amp; &amp;quot; month&amp;quot;,
      ),
      saveInto: local!year
    )
  }
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please try this code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94243?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 08:39:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:235f07f0-9aac-46ec-b9b8-28836eba3cd4</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Do you mean how do I convert, for example 18 months into 1.5 years? or 9 months into 0.75 years? If so, that&amp;#39;s a pretty straightforward calculation - divide your number by 12 and, perhaps, express the value to 2 decimals points.&lt;/p&gt;
&lt;p&gt;If that&amp;#39;s not what you meant perhaps you can elaborate on your requirement?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date</title><link>https://community.appian.com/thread/94242?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 08:32:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4462986f-ea05-47a7-9360-cdcd205c72dc</guid><dc:creator>ajhick</dc:creator><description>&lt;p&gt;Divide by 12?&lt;/p&gt;
&lt;p&gt;You need to give us more to go on. For this it would be good to have expected inputs and outputs. Is this what you&amp;#39;re after?&lt;/p&gt;
&lt;p&gt;Input 12 --&amp;gt; Output 1&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Input 36 --&amp;gt; Output 3&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Input 18 --&amp;gt; Output 1.5&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Input 25 --&amp;gt; Output 2.08&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>