Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decimal to 2 places? 1

Status
Not open for further replies.

sirjon

Instructor
Jun 6, 2002
135
0
0
TH
Hi,

I am calculating a percentage in a function and returning the result as a decimal.

How can I format it to return to 2 decimal places?
Should I be using Decimal?

Much obliged.

J

----------------------------------------------------------------------------------------
A community development project in asp.net -
 
Using a decimal would be one of several ways you could use. e.g
Code:
Dim d As Decimal = System.Math.Round(10.3123564, 2)


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top