jack
1
I want to round/cut a number to two digits before and after the dot. xx.xx
So i use trunc(25.31879431 * 100) / 100
and get 25.31
When I have 5.31879431 I add the first zero at the text output.
But when I have 25.30879431 I get a problem, 25.3 the last zero is missing.
Any idea?
Gruk
2
Same thing, add a 0 at the end of the text output.
jack
3
If which condition is true?
Gruk
4
trunc output length isn’t the expected length?
davy
5
I think the easiest way would be not to divide and cut the string to add the dot.
Number formatting is not something trivial. Apparently, you’re not alone:
Is it panned to add formatting functions?
jack
6
So it works for me so far.
1 Like