<?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>Get value in integer without round off</title><link>https://community.appian.com/discussions/f/general/28752/get-value-in-integer-without-round-off</link><description>Hi I have value 2.67 I want to get this value in integer without round off i.e 2 (integer)</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113122?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 18:04:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df2ae73d-b690-4893-ac0d-635710074d50</guid><dc:creator>shoaib.akhtar</dc:creator><description>&lt;p&gt;Try using &lt;em&gt;int &lt;/em&gt;function, I have tried it and it&amp;#39;s giving me integer without rounding it off. I believe this will suite your requirement perfectly.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;pre class="ui-code" data-mode="text"&gt;int(2.67)&lt;/pre&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113119?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 15:58:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:444e8f0b-0799-42b6-afc6-98a19f28f4fa</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="3520" url="~/discussions/f/general/28752/get-value-in-integer-without-round-off/113118#113118"]fn!rounddown()[/quote]
&lt;p&gt;oddly, rounddown() requires a &amp;quot;number of places&amp;quot; parameter similar to trunc() (which i didn&amp;#39;t realize).&lt;/p&gt;
&lt;p&gt;So far my collection of functions that would do what we&amp;#39;re after here (going from &amp;quot;2.67&amp;quot; to &amp;quot;2&amp;quot;) is up to 3 or 4:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;trunc(2.67, 0)&lt;/li&gt;
&lt;li&gt;floor(2.67)&lt;/li&gt;
&lt;li&gt;rounddown(2.67, 0)&lt;/li&gt;
&lt;li&gt;int(2.67)&amp;nbsp; [&lt;em&gt;thanks, shoaib&lt;/em&gt;]&lt;/li&gt;
&lt;li&gt;ceiling(2.67) - 1&amp;nbsp; /* yes, this one is a stretch */&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113118?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 15:50:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0f677b49-7659-47e4-b898-b52b1cf38f7e</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;That&amp;#39;s in effect the same outcome as fn!rounddown() so no advantage&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113117?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 15:49:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aa6d561c-de07-452c-abd0-44543ca8b916</guid><dc:creator>faraza4154</dc:creator><description>&lt;p&gt;&lt;br /&gt;Not sure if this is the best way around&lt;br /&gt;tointeger(&lt;br /&gt; split(tostring(2.67, &amp;quot;.&amp;quot;)[1]&lt;br /&gt; )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113116?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 15:35:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f9913a51-7a43-407e-8fd1-3a5a6f8ca2dc</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Ok I can see how that might be an interpretation...if so then that&amp;#39;s a pretty basic misapprehension as to how data typing works...I&amp;#39;d&amp;nbsp;recommend a strong dose of&amp;nbsp;&amp;#39;Data Types 101&amp;#39;...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113115?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 14:43:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:acd9e55a-7aa4-4ad0-92a2-681ee2fdde2a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Among other things, no less.&amp;nbsp; round(), trunc(), floor(), cieling() (though not in this case), etc, can all deal with &amp;quot;convert decimal to integer&amp;quot; problems.&amp;nbsp; However in this case it sounded (to me at least) like they &lt;em&gt;want&lt;/em&gt; &amp;quot;2.67&amp;quot; and don&amp;#39;t understand why it&amp;#39;s turning to just &amp;quot;2&amp;quot; after being shoehorned into an INTEGER value..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113110?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 14:13:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb55a284-7e4a-453c-aaf9-decd27290337</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Not entirely sure what you&amp;#39;re wanting here. If you want any decimal to always be a rounded down integer (e.g. 2.67-&amp;gt;2, 3.14-&amp;gt;3, 99.99-&amp;gt;99) then you can use fn!rounddown() on the decimal value and then cast to an integer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get value in integer without round off</title><link>https://community.appian.com/thread/113109?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 14:00:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57ce6387-dae5-4b2c-bd15-6ac161c6b64b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Then you want a &lt;a href="https://docs.appian.com/suite/help/23.1/Floating_Point_Component.html"&gt;decimal&lt;/a&gt;, not an integer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>