<?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>count no of days</title><link>https://community.appian.com/discussions/f/rules/24951/count-no-of-days</link><description>hi, 
 for ex, if i enter some date from that date till today how many days? how to count no of days</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: count no of days</title><link>https://community.appian.com/thread/96585?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2022 05:51:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c0b4fddc-ac76-4b09-a831-07582d2a6bd5</guid><dc:creator>kaushikmg</dc:creator><description>&lt;p&gt;&lt;a href="/members/kavyam0002"&gt;KM&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Answer to above query, hope this helps&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " height="229" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/1512.Screenshot-2022_2D00_06_2D00_22-112051.png" width="666" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: count no of days</title><link>https://community.appian.com/thread/96583?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2022 05:12:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e6584803-d513-4ea9-9f52-295fc01b013e</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;what if i give date along with time how to calculate that [date and time]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: count no of days</title><link>https://community.appian.com/thread/96562?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 15:04:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:71a037e8-bd21-4f5e-a3fe-af4ae7a239df</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I find it helpful to create an Expression Rule in my environments that can do a null-safe &amp;quot;elapsed days&amp;quot; comparison between any 2 dates, in the manner required by your system (i.e. sometimes if the starting and ending date are the same, you&amp;#39;d want to return a value of &amp;quot;1&amp;quot; instead of &amp;quot;0&amp;quot;, in other words doing an &amp;quot;end dates inclusive&amp;quot; value).&amp;nbsp; For example the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;/* RULE_CalculateElapsedDays */
/* Takes a Start and End date and calculates total elapsed (i.e. deployed) days,
  inclusively -- e.g. if the start and end date are the same day,
  the total elapsed days will be 1 instead of 0. */

if(
  or(
    a!isNullOrEmpty(ri!startDate),
    a!isNullOrEmpty(ri!endDate)
  ),
  tointeger(null()),
  
  tointeger(ri!endDate - ri!startDate) + 1
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: count no of days</title><link>https://community.appian.com/thread/96544?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 10:29:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:10d16e21-fdfa-4259-90c5-00dcf1bdbc3e</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;&lt;a href="/members/kavyam0002"&gt;KM&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You could use something like below:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;tointeger(today() - ri!date)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1655807326863v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: count no of days</title><link>https://community.appian.com/thread/96543?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 10:11:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae7ba511-fc71-4700-b7fd-ac4954b5c2b8</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;When you have two dates, you can just subtract them. Wrap it into a tointeger() and you are good to go.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>