Moonsoft Software Solutions

Calc Builder Support

Calc Builder support
Public write access is disabled. Please login
Last post
JoeCool

JoeCool
2 posts
---
06.12.2011 00:19

2 Digits Result

Hi,
after some operations, i've gotr a result. However i would like the result to be a 2 digits result, like 215.60€. I can only have an answer like 215.5985€.
Is there an easy way to obtain that kind of result ?
Thanks for your help.




 
MSTeam

MSTeam
227 posts
---
06.12.2011 11:59
Re: 2 Digits Result
Hello,
to format numbers before showing the results, you should use number_format function, where you can specify number of decimals and decimal/thousand separators. Usually this should be done at the last lines of the code, when all math is finished. To check an example we suggest to download and import the example calculator '4 basic operations & formatting numbers' here:

http://components.moonsoft.es/downloadcalcbuilder

where you can see how different formatting are applied to the results.

Hope this helps, best regards
Moonsoft Team


Moonsoft Team
www.moonsoft.es

 
JoeCool

JoeCool
2 posts
---
06.12.2011 12:28
Re: 2 Digits Result
Thanks, works like a charm !
Have a nice day.