<?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>Number of months between two dates</title><link>https://community.appian.com/discussions/f/general/14869/number-of-months-between-two-dates</link><description>How can I get the number of months between two dates? 
 For example, the number of months between 20/12/2010 and 20/12/2011 is 12. 
 Thanks for your help.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Number of months between two dates</title><link>https://community.appian.com/thread/73148?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2020 19:26:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e64afed6-373e-446c-a995-0aeb24fb358f</guid><dc:creator>noem0001</dc:creator><description>&lt;p&gt;thanks dude! &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&amp;nbsp; this actually works. for my case&amp;nbsp;I wrapped around the&amp;nbsp;absolute value function to so i dont get negatives...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;abs() function&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Number of months between two dates</title><link>https://community.appian.com/thread/66578?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 14:52:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2aef3aa6-cc20-4ad2-a793-85cedec38849</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;This might provide what you need without having to expend a lot of effort on making your own:&amp;nbsp;&lt;a href="/b/appmarket/posts/date-and-time-utilities"&gt;https://community.appian.com/b/appmarket/posts/date-and-time-utilities&lt;/a&gt;. It has an Elapsed Function called &amp;#39;elapsedMonths&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Number of months between two dates</title><link>https://community.appian.com/thread/66577?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 14:20:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:97e3c3aa-64cc-4311-afc6-182a7e7e81b3</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;load(&lt;br /&gt; local!years: year(&lt;br /&gt; ri!todate&lt;br /&gt; ) - year(&lt;br /&gt; ri!fromDate&lt;br /&gt; ),&lt;br /&gt; local!months: (&lt;br /&gt; local!years&lt;br /&gt; ) * 12 + month(&lt;br /&gt; ri!todate&lt;br /&gt; ) - month(&lt;br /&gt; ri!fromdate&lt;br /&gt; ),&lt;br /&gt; local!months&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Number of months between two dates</title><link>https://community.appian.com/thread/66554?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 05:52:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f752c5b9-8429-489c-ac95-559f4f4f4350</guid><dc:creator>fredaf</dc:creator><description>&lt;p&gt;Hi Fabian,&lt;/p&gt;
&lt;p&gt;So AFAIK, i don&amp;#39;t think there&amp;#39;s a direct way to do this. But using a little logic it&amp;#39;s pretty simple. Firstly use the fn!year()&amp;nbsp;on both dates and&amp;nbsp;compare the years difference, if the difference is zero you can proceed with using fn!month function on both dates and get the difference between the two months. If the year difference wasn&amp;#39;t zero then u can add those many numbers of months to the above result. So if the year diffference was 1, you add 12 months and so on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>