473,385 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1972
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: techy techno | last post by:
hii Experts..!! I need someone to tell me where I can get a Currency Converter like http://cconv.textor.com please can someone tell me where I can get it I need it for free + I dont need...
2
by: Jack | last post by:
Hi, I have form where one has to input officer's salary along with other data. The officer's salary field is tied to a currency field in backend Access. Right now folks enter numbers e.g....
3
by: Dave Stone | last post by:
This question appeared years ago in the context of Acc2K and SQL Server 7, but no replies were posted. HOWEVER!! It still seems to be a problem with Acc XP and SQL Server 2000. Surely someone has a...
2
by: SamIAm | last post by:
I am displaying money values in a textbox like this: txtCountryPack.Text = String.Format("{0:c}", dr); I then need to updated my Database: decimal packPrice =...
11
by: Adrian | last post by:
Hi I want to use the following declarations but vb dotnet keeps complaining that currency can't be used because it private ? I have tried it in a module and in the declaration pare same error!...
1
by: crater | last post by:
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...
2
by: sck10 | last post by:
Hello, I have a SQL Server 2K table with a field set to currency. When I try to insert or update a FormView, I get the following error: Disallowed implicit conversion from data type nvarchar...
5
by: Eric | last post by:
Java has this. Anyone know of a .Net equivalent? Thanks, Eric
18
by: maxpirate | last post by:
The currency values are displayed in format of the regional settings specified in the computer of the user. I would like to display all the currency values in dollar format irrespective of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.