473,387 Members | 1,641 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,387 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 1973
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.