Money format

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I can't seem to get the money format (String.Format("{0:c}") to work for
data coming from my database.

If I do

WagesMin.Text = String.Format("{0:c}",10000))

This will put "$10,000.00" into WagesMin.Text.

But if I do this where WagesMin = 1,000.00

WagesMin.Text = String.Format("{0:c}",emailReader("WagesMin"))

I get 1,000.000. No formatting at all.

With Calculate a function that returns a Single, if I do:

WagesMin.Text =
String.Format("{0:c}",CalculateYearly(emailReader("WagesMin")))

it would come back something like:

$230,000.00 (as I would expect)

Do I need to do some sort conversion for the emailReader("WagesMin") before
I do the String.Format?

Thanks,

Tom
 
Back
Top