Adjust double data type to take only the first 2 decimals

Dear colleagues,
I calculated the amount without VAT in this way (both variables being type Double)
image
ā€¦ and I get the amount, but with too many decimals. I want only 2
image

Hi,

Do you want to round the value? If so, the following helps you.

Math.Round(doubleVar,2,MidpointRounding.AwayFromZero)

Regards,

Thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.