Hi,
I’ve been trying to use Math.Round, but noticed that whenever I do it two two decimal places it always rounds down, and whenever I attempted to use Math.Ceiling, it will always round to the nearest interger, I was wondering if there was any way to use either one of these two round up to the second decimal place?
And Also:
With too much conversions
Also have a look here:
Can you share some examples, where you are facing the issue?
3 Likes
This worked for me.
Regarding your Math.round
Try doing it with only 3 decimals
Maybe you are looking for the F3 - 3 decimals
Otherwise just open a new topic and get individual help from there
Don’t need any help. Just an observation I have made.
Math.Round will floor unless last decimal is >5.
So
Math.round(99.985,2) will give 99.98
Math.round(99.985,2, MidPointRounding.AwayFromZero) will give 99.99
If precision is a must, convert the value to decimal
Convert.ToDecimal(dou_var)