Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27345

How to convert numbers in VB2010

$
0
0
ive written my code and it converts liters prices to gallon prices but the result i get is to long for example in my code I wrote:
conversion.text = val(liters)*3.78

(by the way the liters price in my design says "0.92 per liter" )

now the conversion is correct but, the number that shows in conversion.text is too long ($ 3.4776) how can i make it just show ($ 3.47)?
would i have to dim something as decimal? how would i do this?

i dimmed everything as double.

Viewing all articles
Browse latest Browse all 27345

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>