Show only 2 decimal points from double

Hello, I have diferent decimal numbers in double format. I would like That only whole number and two decimal places was shown.

@tomaz

You can use math.Round(variable,2)

cheers

Or ToString method:

DoubleVariable.ToString("0.##")
1 Like

Hi @tomaz

You can use any of these expressions:

• String.Format (“{0:0.00}”, YourInput)

• Math.Round (YourInput, 2).ToString

• YourInput.ToString (“##.00”)

Regards
Gokul

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