<?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 can I get the difference (in days) between two DATETIMES?</title><link>https://community.appian.com/discussions/f/general/37370/how-can-i-get-the-difference-in-days-between-two-datetimes</link><description>Hi All, I am calling 2 values from my record type in the DATE and TIME format and I want it to produce the amount of days in between the dates. Saw this suggestion in a previous post in regular date format: tointeger(tointervalds(today()) - tointervalds</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How can I get the difference (in days) between two DATETIMES?</title><link>https://community.appian.com/thread/139893?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 15:11:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5a44c2ef-1258-4bb2-9ad9-f7c73b9a1e43</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Great! &lt;a href="/members/gusl6792"&gt;GusL6792&lt;/a&gt;&amp;nbsp; Please do verify the answers that were helpful to you and mark this thread as closed as it would help others with similar issue get the answer quickly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the difference (in days) between two DATETIMES?</title><link>https://community.appian.com/thread/139892?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 14:57:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8ba7fc94-a0e1-49c3-9848-cba65ef123a3</guid><dc:creator>GusL6792</dc:creator><description>&lt;p&gt;HI Konduru, Thanks for the help I was able to resolve the issue. I did not add the correct Rule Input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the difference (in days) between two DATETIMES?</title><link>https://community.appian.com/thread/139885?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 14:03:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:83c81be4-1d19-4a46-98e4-a482104d9977</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Please share the code snippet you are trying&lt;/p&gt;
[quote userid="288488" url="~/discussions/f/general/37370/how-can-i-get-the-difference-in-days-between-two-datetimes/139884"]Could not cast from Record Field to Date and Time. Details: CastInvalidCould not cast from Record Field to Date and Time. Details: CastInvalid&amp;quot;[/quote]
&lt;p&gt;May be&amp;nbsp;you are not indexing the value but just mentioning the record Field.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the difference (in days) between two DATETIMES?</title><link>https://community.appian.com/thread/139884?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 14:02:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4724c53f-1f7e-4051-899f-c3b3e97905b6</guid><dc:creator>GusL6792</dc:creator><description>&lt;div class="SplitPaneLayout---pane SplitPaneLayout---secondary_pane"&gt;
&lt;div class="SplitPaneLayout---contents"&gt;
&lt;div class="TabButtonGroup---tab_group TabButtonGroup---inHeaderBodyLayout TabButtonGroup---margin_above_none"&gt;
&lt;div class="TabButtonGroup---tab_contents_container TabButtonGroup---flush"&gt;
&lt;div class="ContentLayout---content_layout ContentLayout---padding_less"&gt;
&lt;div class="SectionLayout2---sectionLayout SectionLayout2---margin_above_none"&gt;
&lt;div class="CollapsibleElement---collapsible"&gt;
&lt;div class="SectionLayout2---section_contents SectionLayout2---margin_below_standard" data-testid="SectionLayout2-contentContainer"&gt;
&lt;div class="MessageLayout---message MessageLayout---error"&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---align_start ParagraphText---inMessageLayout ParagraphText---error elements---global_p" data-testid="ParagraphText-paragraph"&gt;&amp;quot;Expression evaluation error at function &amp;#39;calworkdays&amp;#39;: Could not cast from Record Field to Date and Time. Details: CastInvalidCould not cast from Record Field to Date and Time. Details: CastInvalid&amp;quot; is the error I receive&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the difference (in days) between two DATETIMES?</title><link>https://community.appian.com/thread/139883?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 13:56:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e299c25e-5fae-4718-9ea3-27e26f4836cb</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello &lt;a href="/members/gusl6792"&gt;GusL6792&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please look at the below&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/24.3/fnc_date_and_time_calworkdays.html"&gt;docs.appian.com/.../fnc_date_and_time_calworkdays.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>