So if you have
Dim thirtyEight = "38" Dim sixPointFour = "6.4"
Then the best way to parse them into a numeric type: Double.Parse or Int32.Parse , you should keep your data typed until you want to display it to the user.
Then, if you want to format a string with 3 decimal places , do somthing as String.Format("{0:N3}", value) .
So, if you want to quickly crack the problem,
Dim yourString = String.Format("{0:N3}", Double.Parse("38"))
.
Jodrell
source share