Unformatting currency values for updating SQLServer

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

Guest

Have any of you good folks out there got an elegant solution for unformatting
currency values for writing back to SQLServer:

e.g.: $10,100,200.59 to 10100200.59 but for any locale and any currency.
 
Yep. Just use something like

============
using System.Globalization;
....
....
decimal value = Decimal.Parse("$10,100,200.59 ", NumberStyles.Currency )
============

Hope this helps.

Brian Delahunty
Ireland

http://briandela.com/blog
 
Back
Top