currency

JavaScript culture sensitive currency formatting

How can i format currency related data in a manner that is culture aware in JavaScript? ...

Use Float or Decimal for Accounting Application Dollar Amount?

We are rewriting our legacy Accounting System in VB.NET and SQL Server. We brought in a new team of .NET/ SQL Programmers to do the rewrite. Most of the system is already completed with the Dollar amounts using Floats. The legacy system language, I programmed in, did not have a Float so I probably would have used a Decimal. What is your...

Best way to convert a decimal value to a currency string for display in HTML.

I wanting to show prices for my products in my online store. I'm currently doing: <span class="ourprice"> <%=GetPrice().ToString("C")%> </span> Where GetPrice() returns a decimal. So this currently returns a value e.g. "£12.00" I think the correct HTML for an output of "£12.00" is "&pound;12.00", so although this is rendering fi...

Best way to store currency values in C++

I know that a float isn't appropriate to store currency values because rounding errors. If there a standard way to represent money in C++? I've looked in the boost library and found nothing about it. In java, seems that BigInteger is the way but I couldn't find an equivalent in C++. I could write my own money class, but prefer not to do ...

How to format a currency datafield in Flex

I have an xml file providing data for a datagrid in Flex 2 that includes an unformatted Price field (ie: it is just a number). Can anyone tell me how I take that datafield and format it - add a currency symbol, put in thousand separators etc. Thanks. S. ...

Programmatically access currency exchange rates

I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars. Does anyone know if I can pull up to date exchange rates off the net somewhere in an easy-to-parse format I can acce...

How to avoid rounding problems when comparing currency values in Delphi?

AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because of this I'm having rounding problems when comparing two Currency values, returning different results depending on the machine. For now I'm using the SameValue function passing a Epsilon parameter = 0.009, because I only need 2 decimal digits ...

Force ASP.NET textbox to display currency with $ sign

Is there a way to get an ASP.NET textbox to accept only currency values, and when the control is validated, insert a $ sign beforehand? Examples: 10.23 becomes $10.23 $1.45 stays $1.45 10.a raises error due to not being a valid number I have a RegularExpressionValidator that is verifying the number is valid, but I don't know how t...

Setting a DBGrid column format in Delphi

I am using a DBGrid component in delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid. Someone knows how? ...

Storing money in a decimal column - what precision and scale?

Hi, I'm using a decimal column to store money values on a database, and today I was wondering what precision and scale to use. Since supposedly char columns of a fixed width are more efficient, I was thinking the same could be true for decimal columns. Is it? And what precision and scale should I use? I was thinking precision 24/8. Is...

ISO Country/Currency data

All, Our application requires data on ISO countries and currencies (where the data must be up to date). We did purchase country/currency data from ISO themselves, however we still needed to perform alot of manual manipulation of the data, as well as write our own tool to read and process the data into our database. Are we going about ...

What is the best datatype for currencies in MySQL?

I want to store values in a bunch of currencies and I'm not too keen on the imprecise nature of floats. Being able to do math on them directly in queries is also a requirement. Is Decimal the way to go here? ...

Money Type

Does anyone know of an already implemented money type in the .net framework that supports i18n (currencies, formatting, etc)? I have been looking for a well implemented type and can't seem to find one. ...

Representing Monetary Values in Java

I understand that BigDecimal is recommended best practice for representing monetary values in Java. What do you use? Is there a better library that you prefer to use instead? ...

How do I format a number to a dollar amount in PHP

How do you convert a number to a string showing dollars and cents? eg: 123.45 => '$123.45' 123.456 => '$123.46' 123 => '$123.00' .13 => '$0.13' .1 => '$0.10' 0 => '$0.00' ...

What file format would I use for currency exchange

I'm looking for a standard file format that used by systems needing to store currencies and also provide currency exchange (so we need both the buy and sell rates) I looked online and found the .cex but have not been able to find it's format. Where do I get the format of this file? Is there another file format I should use? ...

Currency formatting in Python

Hey, I am looking to format a number like 188518982.18 to £188,518,982.18 using Python. How can I do this? Cheers ...

basic php form help (currency display)

You guys were very helpful yesterday. I am still a bit confused here though. I want to make it so that the numbers on the rightmost column are rounded off to the nearest dollar: http://www.nextadvisor.com/voip_services/voip_calculator.php?monthlybill=50&amp;Submit=Submit the code for the table looks like this: I want $offer[1,2,3,...

Any leads on a reputable currency conversion data source?

I have to build a currency converter widget and I would like to know if anyone knows of an api or regularly updated data source to get up to date currency conversion rates? ...

What is "The Best" U.S. Currency RegEx?

A quick search for currency regex brings up a lot of results. MSDN uses ^-?\d+(\.\d{2})?$ The problem I have in choosing one of these is that regex is difficult to verify without testing all the edge cases. I could spend a lot of time on this as I am sure hundreds of other developers have already done. So ... Does anyone have a regex...