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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display percent

Status
Not open for further replies.

redoakhg

Programmer
Nov 30, 2006
38
US
Hi,

How do I display this a percent:

#(TheCount/58)#

Currently it displays as:

0.275862068966%

I need:

27%

Thannks
 
You can multiply by 100 (to get your decimal in the right place) and then use the Round or Int functions to get the whole number or round as appropriate.

Take a look at the examples in the manual under these functions.

You could also use the .toString and the Left function to trim off insignificant digits.

 
I ended up using NumberFormat and it seems to work. Thanks for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top