Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Rounding up two decimal places
11-12-2010, 10:44 AM #1
- Join Date
- Sep 2010
- Thanked 0 Times in 0 Posts
Rounding up two decimal places
I have the following bit of code:
Decimal retCut = rrp * retailerCut; Decimal edcut = rrp * edpercentage;
Currently I get the following:
retCut = 3.145
edCut = .3455
I have tried performing the Math.Round() - (Math.Round(edCut, 2) ) - function on them however it doesn't seem to b working. I inserted a break point in my code and it didn't seem to perform any action at all on these figures.
I'm inserting these figures into a database column of type Decimal(18, 2) so as a result of the figures not rounding up, I am losing cents on every entry. These can build over over time. Can anyone point me in the right direction?
11-12-2010, 02:53 PM #2