G
Guest
OK, I have a database table, it has prices of products in it, like so:
ProductPrice MONEY
ProductIsoCurrencyCode CHAR(3)
Now, both CultureInfo and RegionInfo have currency-handling functions inside
them, but I want to display the price on my web site given the information
above, plus the current culture of the web site visitor.
So, I have
- Value (e.g. 23834.23)
- IsoCurrencyCode (e.g. EUR)
- CultureCode (en-GB)
How do I combine the 3 above to get the correct formatting?
I used to store a "CurrencyFormat" string in the database, until I realised
that a lot of the Euro countries format the Euro differently and I was
displaying it quite incorrectly for several of them.
For instance:
- Ireland: €12.34
- France and Spain: 12,34€ (also 12€34 in France)
- Germany and Italy: €12,34
Thanks,
The Boris Yeltsin
ProductPrice MONEY
ProductIsoCurrencyCode CHAR(3)
Now, both CultureInfo and RegionInfo have currency-handling functions inside
them, but I want to display the price on my web site given the information
above, plus the current culture of the web site visitor.
So, I have
- Value (e.g. 23834.23)
- IsoCurrencyCode (e.g. EUR)
- CultureCode (en-GB)
How do I combine the 3 above to get the correct formatting?
I used to store a "CurrencyFormat" string in the database, until I realised
that a lot of the Euro countries format the Euro differently and I was
displaying it quite incorrectly for several of them.
For instance:
- Ireland: €12.34
- France and Spain: 12,34€ (also 12€34 in France)
- Germany and Italy: €12,34
Thanks,
The Boris Yeltsin