473,406 Members | 2,208 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,406 software developers and data experts.

Formatting Currency

How is everyone formatting currency with VB.NET?

Before I was calling the API function for it, which took the currency
symbol from the Windows settings. I've found this to be limited when
working with European countries where business in conducted in several
different currencies. Are you guys just storing a currency symbol and
formatting the number accordingly? What about the comma and decimal
switch that some locales use?

I hope .NET makes this easy for me! :-)

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #1
4 2011
I would say you are better off storing a list of currency codes, symbols,
and decimal places for each currency. I don't think windows settings can
keep up with different currencies, what countries are using which ones, etc.

This also means, that when whatever after .NET comes out, your port will be
easy. You won't have to figure out how to do this in some other framework.

"Mitchell Vincent" <mv******@newsgroup.nospam> wrote in message
news:Oz****************@tk2msftngp13.phx.gbl...
How is everyone formatting currency with VB.NET?

Before I was calling the API function for it, which took the currency
symbol from the Windows settings. I've found this to be limited when
working with European countries where business in conducted in several
different currencies. Are you guys just storing a currency symbol and
formatting the number accordingly? What about the comma and decimal switch
that some locales use?

I hope .NET makes this easy for me! :-)

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com

Nov 21 '05 #2
Mitchell.

The currency difference in the States in Europe is now probably not more
than in America.The oldest 6 EU states plus Ireland, Greece, Spain,
Portugal, Finland, and Austria use the Euro.

In the local settings of the computer are the currencies, and when you do it
right you have almost nothing to do.

There are only two states in Europe that uses a point as decimal point
separator the UK and Ireland. (The same as in America, beside all the States
of the US and English speaking Canada).

However normally there is nothing to do for it, it is a part of the Net and
the OS.

Look for it especially to the overloading ToString and the numberformatinfo

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps,

Cor

..
Nov 21 '05 #3
Mitchell Vincent wrote:
How is everyone formatting currency with VB.NET?

Before I was calling the API function for it, which took the currency
symbol from the Windows settings. I've found this to be limited when
working with European countries where business in conducted in several
different currencies. Are you guys just storing a currency symbol and
formatting the number accordingly? What about the comma and decimal
switch that some locales use?

I hope .NET makes this easy for me! :-)


For future reference :

Dim Price as Double = 10.00

Debug.Writeline(String.Format("{0:c}", Price)

Does it!

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #4
Hi

Thanks for your experience sharing.
If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Colin Fox | last post by:
Hi, all. This feels like a stupid question to me, but I've scoured the Internet (yes, the whole thing! :) and I can't find a single example of using the locale module to format money. So I...
16
by: Douglas | last post by:
Gday, How would I format a number so that: TheValue = 32500 Displays in the TextBox as: $32,500.00
3
by: Vlad | last post by:
Hi, I am trying to display a currency value formated according to the current culture in ASP.NET: decimal x = 125345.54M; string currencyString = String.Format("{0:c}",x); what gets retured is...
6
by: Brad | last post by:
I guess I still have not grasped the logic of formatting a simple label or text box. Why would the following not work? I need the resulting label to display currency. lblAmtDue.Text =...
8
by: G.Ashok | last post by:
Hi, I have created CultureInfo object and specified required digit grouping in it. The one of the overloaded ToString methods of Decimal type has parameters to format the value with required...
14
by: Scott M. | last post by:
Ok, this is driving me nuts... I am using VS.NET 2003 and trying to take an item out of a row in a loosely-typed dataset and place it in a label as a currency. As it is now, I am getting my...
1
by: scoarescoare | last post by:
I am running into a problem that I cannot seem to solve. I'm using ADO.NET 2.0 with vb 2005. I have a dataset as a datasource that selects all of the Shoe_Types from a Shoe_Type table. I am...
9
by: john coltrane | last post by:
Is there way to create a formatted string in a similar that is similar to sprintf? The same for printing, printf? C,D,E,F,G,N,X for currency, decimal, exponential, fixed, general, numerical,...
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
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.