Post Closed
135
Views
2
Comments
Solved
Rounded off

I have Decimal number 62.96948  but shold display as 62.96 not rounded. I used conversion FormatDecimal(TexttoDecimal(nameof variable),0,",",".") but still rounded 62.97. I will be very grateful if you give me some idea). Thank you!

2018-10-18 08-34-00
Eric Bulters
 
MVP
Solution

Hi Svitlana,
You asked this question already here (and was answered)
https://www.outsystems.com/forums/discussion/74901/rounded-number/

The solution being

You can use the Trunc() function which will remove the decimals. To get it to leave the first 2 decimals use it like this:

Trunc( [YourDecimal] * 100) / 100


Kind rergards, Eric

2020-09-21 11-35-56
Sachin Waghmare

Hello Svitlana,

Could you please refer the below link? It will give an idea how to implement the solution to fulfil your requirement.

https://www.outsystems.com/forums/discussion/44508/math-functionality-of-outsystems-to-round/

Thanks & Kind Regards,

Sachin

2018-10-18 08-34-00
Eric Bulters
 
MVP
Solution

Hi Svitlana,
You asked this question already here (and was answered)
https://www.outsystems.com/forums/discussion/74901/rounded-number/

The solution being

You can use the Trunc() function which will remove the decimals. To get it to leave the first 2 decimals use it like this:

Trunc( [YourDecimal] * 100) / 100


Kind rergards, Eric