I am confused by this @George. I want to do a division calculation and round the result to 2 decimal places but end up with a number that I can then use in other calculations.
According to Wappler, the Format Number function will leave me with a string which potentially has a delimiter too.
How can I do a round to 2 decimal places and end up with a number? Do I then have to do a .toNumber()
on the result? Or is there a .round(2)
function somewhere that I can use?
Second Question…
I have just tried to do the above using the experimental mode user interface and I have ended up with this syntax:
{{$_SESSION.s_amount_to_pay / s_exchange_rate.formatNumber(2, ".", ",".toNumber())}}
Which I am sure is not what I need. I am looking to calculate:
s_amount_to_pay / s_exchange_rate
Rounded to 2 decimal places.
How do I create that equation on the server side?
Best wishes,
Antony.