Taking formatting off

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

tshad

I am using a FormatCurrency to display my Salary data and want to be able
update my record.

salaryCurrent.text = FormatCurrency(ClientReader("salaryCurrent"),2)

The problem is that the Currency may have a "$" in it from the
FormatCurrency. Is there an easy way to strip formatting information before

Something like:

.Add("@salaryCurrent",SqlDbType.Money).value =
UnFormatCurrency(salaryCurrent.text)

Obviously, there is no UnformatCurrency command.

Thanks,

Tom
 
If I understand your question, you are trying to parse a currency string back
to decimal. If so, try
Decimal.Parse(salaryCurrent.text, NumberStyles.Currency, Nothing)
JT
 
JT said:
If I understand your question, you are trying to parse a currency string
back
to decimal. If so, try
Decimal.Parse(salaryCurrent.text, NumberStyles.Currency, Nothing)

That was what I was looking for, once I added "System.Globalization." in
front of the NumberStyles. I assume I could just import that namespace.

Thanks,

Tom.
 
Back
Top