currency

String.Format("{0:C2}", -1234) (Currency format) treats negative numbers as positive

Hi I am using String.Format("{0:C2}", -1234) to format numbers. is always formats the amount to a positive number, while I want it to become $-1234 ...

Hints for a complex currency regular expression for Javascript?

I need to match an infinite number of figures in a web page. I need to be able to match all of the following formats: 100 $ 99$ $99 $ 8 $.99 $ .8 $ 99.8 .99$ .99 $ 9.2 $ 1.2$ And the equivalent using commas: 444,333 22,333 1,222 11,111,111 333,333,333,333.01132 Or spaces: 444 333 22 333 1 222 11 111 111 333 333 333 333.01132 Th...

Ruby on Rails: best method of handling currency / money

I'm in the process of learning Ruby on Rails and I've set myself the task of putting together a very basic shopping cart system. I have a table items that costs of a price column currently set to integer. I have no problem with inputting the data in cent, but when it comes to displaying the price in th view, well I obviously want it to b...

localizing currencies in iphone app

I am testing my app. All is working fine except when I change locales to Germany. Basically you input 2 values in your local currency, a calculation happens and the user gets info back. Users numeric inputs are handled well. That is, on "Editing Did End" a method executes that converts the number to its local currency equivalent. So i...

Format a double value like currency but without the currency sign (C#)

Hi, I feed a textbox a string value showing me a balance that need to be formatted like this: ###,###,###,##0.00 I could use the value.ToString("c"), but this would put the currency sign in front of it. Any idea how I would manipulate the string before feeding teh textbox to achieve the above formatting? I tried this, without succe...

datacolumn format as currency in .NET

Can I format the type of a datacolumn of a dataset to currency (for a specific culture) before binding it to the grid ...

Persisting Currency format in Cocoa on a device that so easily could change Region Format

I'm storing my currency values in NSDecimalNumbers (as recommended in multiple other threads on this forum) and using an NSNumberFormatter to display them correctly and handle the text input. All good! However, when I change the Region Format under iPhone prefs General settings to somewhere outside the US, say Germany, and then look at m...

Determining the number of decimal numbers for a currency

On the iPhone: Using the US locale, a currency looks like this: $1,234.56 Using the UK locale, a currency looks like this: £1,234.56 Using the German (Germany) locale, a currency looks like this: 1.234,56 € and finally, a Japanese currency: ¥1,234 The Japanese currency has no decimals and this impacts my custom keyboard significantl...

Cocoa NSNumberFormatterCurrencyStyle without "$" return zero

I have a number formatter set up to convert currency strings to decimal values. The problem is that if the text string does not have a leading dollar sign ("$"), it gets converted to 0, rather than a valid matching number. So: "$3.50" converts to 3.50 "3.50" converts to 0 Here is the code for the converter: // formatter to convert a...

How do I get NumberFormatter to print negative currency values with a minus sign?

I'm using the PHP NumberFormatter class to print currency values. Eg: $cFormatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY); $cFormatter->formatCurrency(123, 'USD'); $cFormatter->formatCurrency(123, 'BRL'); $cFormatter->formatCurrency(123, 'GBP'); That works fine, and returns "$123.00", "R$123.00", "£123.00" r...

Format currency without rounding

I have the need to format a decimal number as currency but I do not wish for any rounding to occur in the process. For example (example culture is en-US) Dim money = 1234.556789D money.ToString("C") ' Yields $1,234.56 (notice the rounding & truncating) money.ToString("C99") ' Yields $1,234.556789000000000000....0 -- close but not perf...

Where can I find updated, live exchange rates?

How do I link live currency exchange rates to my iPhone app? First, anyone know any sites where I can get the exchange rates? And second, how do I link that to my app? I want to do what this app does. http://the-dream.co.uk/currencee/ ...

Are there any free currency textbox controls for Silverlight?

If not, what's the best way of sanitizing users' input (keyboard and pasting from the clipboard)? ...

Currency Mask with Jquery

I'm using the Jquery calculation and have just about everything working properly, but I need the total to display as 99.90, not 99.9 <-- Just an example. Here is a link the form I'm using. [link text][1] [1]: So... .toFixed(), isn't working for some reason, when it should be! I can't find a mask that would work with this problem. ...

Delphi debugger showing ???? for Currency variables

I'm trying to see the value of a variable, but the debugger shows me a value of "????". This seems to happen to Currency variables, but not other types (Double and enumerated types are ok). I'm debugging on Windows XP SP 3 using Delphi 10 Update 2. The process I'm using is: Build the project in the BDS IDE. Copy the exe to the direct...

java - BigDecimal

I was trying to make my own class for currencies using longs, but Apparently I should use BigDecimal (and then whenever I print it just add the $ sign before it). Could someone please get me started? What would be the best way to use BigDecimals for Dollar currencies, like making it at least but no more than 2 decimal places for the cent...

rails currency gem or plugin...

I'm shopping for a gem or plugin to help me convert between currencies and handle day to day exchange rate fluctuation. I've found the gem currency: http://currency.rubyforge.org/ And a few other plugins... http://wiki.github.com/jasonfranklin-stokes/currencyexchange & http://jamesbrooks.net/2009/01/05/rails-cash-handler-plugin/ The...

Currency exchange rates for paypal

Does anyone know a way to get the currency exchange rates for paypal? We have custom shopping cart and use Paypal (Website Payments Standard) to handle payments. Our 'home' currency is Euro, but we would like to present our customers the option to pay in different currencies (USD, CAD, AUD and GBP). PayPal offers the option to:     a) ...

c# Datagridview cell not accepting currency format change.

Hi, I am trying to change the format of a cell in a datagridview using the following code. this.dataGridView[2, 1].ValueType = typeof(decimal); this.dataGridView[2, 1].Value = 500; this.dataGridView[2, 1].Style.BackColor = System.Drawing.Color.OrangeRed; this.dataGridView[2, 1].Style.Format = "c"; The c...

Need Customizable Currency converter

Hi Everyone, I want to add "currency converter" to my web site. I have used javascript form currency-converter.com. But I want a converter whose layout can be customizable. Anybody help??? Thanks in advance. ...