<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/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 find the date difference from 2 fields.</title><link>https://www.aras.com/community/f/development/6394/how-to-find-the-date-difference-from-2-fields</link><description>Hi i have a question and i would really love to get help. i currently allow user to select a start and a end date. with this information i want to calculate the number of days. I have tried coding this myself but i keep getting errors. 
 
 string startDtStr</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to find the date difference from 2 fields.</title><link>https://www.aras.com/community/thread/3649?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 07:10:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:f0d83b83-ea23-40d4-946e-a33a2587a00e</guid><dc:creator>user123</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That has helped thank you so much. I&amp;nbsp; really appreciate this. Thanks&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find the date difference from 2 fields.</title><link>https://www.aras.com/community/thread/3642?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2019 12:05:39 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a9f5e62b-9bce-436c-9a3c-af35adff51c3</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;you need to do a range check. This sample from an old draft of mine contains a separate class for the Data Range calculation that may work for your use case too:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/AngelaIp/aras-pm-resource-mgmt/blob/master/Import/pmResourceMgmt/Import/Method/BPL_PM_Resource_checkDates.xml"&gt;https://github.com/AngelaIp/aras-pm-resource-mgmt/blob/master/Import/pmResourceMgmt/Import/Method/BPL_PM_Resource_checkDates.xml&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you skip the activity stuff, you should be able to reuse where ever you want with this call:&lt;/p&gt;
&lt;p&gt;var body = &amp;quot;&amp;lt;start_date_&amp;gt;&amp;quot; + dateStart + &amp;quot;&amp;lt;/start_date_&amp;gt;&amp;quot; +&lt;br /&gt; &amp;quot;&amp;lt;end_date_&amp;gt;&amp;quot; + dateEnd + &amp;quot;&amp;lt;/end_date_&amp;gt;&amp;quot;;&lt;br /&gt; &lt;br /&gt;var result = aras.applyMethod(&amp;quot;MyMethodname&amp;quot;,body);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>