Format numeric values in strings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a problem formatting a string

I have a decimal myDecimal which contains 0,3
What I want to display in a string is "€ 0,30"

So here's what I do

Dim myString As Strin
Dim prov As NumberFormatInfo = New NumberFormatInf
prov.CurrencySymbol = "€
prov.CurrencyPositivePattern =
prov.CurrencyDecimalDigits =
myString = Convert.ToString(myDecimal, prov
MessageBox.Show(myString

The messagebox shows "0,3" !

How can I get the format to work properly

Any help will be very much appreciated! Thanx

Ver
 
Hello Vera
I tried adding prov.NumberDecimalDigits = 2 before
converting and still it displays 0,3 , strange.

Kind Regards
Jorge
 
Back
Top