471,330 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

Unformatting currency values for updating SQLServer

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.
Aug 7 '05 #1
1 1910
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
"crater" wrote:
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.

Aug 7 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dave Stone | last post: by
2 posts views Thread by SamIAm | last post: by
5 posts views Thread by Eric | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.