For instance I have the following value:
0.000018
This is 6 decimal places, but I want to round it up the nearest whole 4th decimal place, so that:
0.000018 -> 0.0001
I've played with the round() funcction but if I simply use the round function:
round(0.000018,4) = 0.0000
When dealing with decimals for financial purposes, in this case one needs to round up and charge the customer instead of giving them a freebie! But round()
will go round up or down depending on value, I need to consistently round up.
Is there a simple way of doing this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…