Concatenating A Double

R

Ron

Can anyone tell me how I can remove a few zero's from the end of a double?

For example, the number I have is 55.0000, the number I need is 55.00.

How can I go about trimming the zeros?

Thanks,

Ron
 
S

Scott Schluer

Dim dblValue As Double = 55.0000

Convert.ToDecimal(dblValue)

or

FormatNumber(dblValue, 2)

The second parameter specifies the number of digits to the right of the
decimal place that should be displayed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top