I want to round off one decimal variable (ex Rs. 5.65) with 2 rules:
- if the part after decimal (.65 in
the example) in greater that 49, add
1 to the part before decimal.(Make
it 6) - If the part after decimal is less
that 49(ex: 2.45) remove the part
after decimal(Ex: Make it 2.00)
Please suggest a solution.
EDIT Can anyone tell me how to achieve the same using TSQL and CrystalReport ???
Look at
Math.Round(decimal, MidPointRounding), it should do what you need.