Questions tagged [currency]

Currency is a medium of exchange of value, usually referring to government issued denominations.

The Currency tag is relevant to any topic that involves the handling of currency, including accurate calculation, rounding schemes, best practices and display formatting. It is also applicable to discussions of how specific languages or libraries handle currency.

http://en.wikipedia.org/wiki/Currency

2964 questions
1
vote
1 answer

Google Currency Converter

I had used this code in the last years however google seemed to have changed some of their links. For some reason I am getting this error message: "Input string was not in a correct format." in following line: decimal rate =…
Mark Fenech
  • 1,358
  • 6
  • 26
  • 36
1
vote
0 answers

DecimalFormat("¤#,##0") prefixing  in unit tests

I'm writing unit tests for a method that formats some numbers and when I use DecimalFormat("¤#,##0") it always prefixes  in the unit tests. It does not display the  in the XML output file that the numbers are written to, but it does in the unit…
Nick L
  • 281
  • 1
  • 6
  • 18
1
vote
2 answers

Currency with 3 decimal digits in python

I have the following code which compares the input value that comes as a string with the one the function constracts. Basically checks the if the number the user enters is correct. The function works but only for 2 decimal points but the user is…
user2922524
1
vote
1 answer

LinqToExcel and currency format (Culture)

I use LinqToExcel in my application for a while now and has been working like a charm. But I'm facing a problem reading currency strings from Excel. I can't post images yet, but the value in excel is 9999 formated like 9.999,00 (pt-BR) Local in my…
1
vote
1 answer

Currency rate update Stop , Cannot convert anymore since 2015-03-04

Since march 5 2015, we cannot convert anymore. The service that we used is Yahoo. Is there something wrong? 2015-03-02 04:32:35 currency updated. 2015-03-03 04:33:24 currency updated. 2015-03-04 04:33:07 currency updated. 2015-03-05 04:47:25 ERROR :…
JBK
  • 11
  • 1
1
vote
4 answers

Linux command to change xx.xx into xx,xx (for currency)

I live in Holland and currency is stated with a komma (,) instead of a dot (.) I.e.feeds with 14.95 is interpreted as a number instead of 14,95 in euros Is there a LINUX command (sed?) which can solve this problem? So 14.95 is changed into 14,95…
Peter
  • 53
  • 1
  • 7
1
vote
1 answer

Displaying price in cents

I'm trying to display a price in cents (99¢) instead of dollars ($0.99) using NSNumberFormatter and a locale. This code turns a price of 99 cents into the string: $0.99. Is there a way to get NSNumberFormatter to try to use smaller/cent…
Warpling
  • 2,024
  • 2
  • 22
  • 38
1
vote
2 answers

Convert between two currencies by the click of a button in the same cells

I want to create a function in my Excel workbook that converts all the cells in the three sheets I am currently using with a currency format from one currency (SLL) to another (DKK) by the click of a button (the same button converts in SLL or in DKK…
Saud
  • 480
  • 1
  • 9
  • 26
1
vote
0 answers

Wrong format using NumberFormatter::formatCurrency with es_ES locale

I'm working on currency display for my website using NumberFormatter::formatCurrency. I did a quick a dirty test to see if everything was fine, like this: $nf = new \NumberFormatter('es_ES', \NumberFormatter::CURRENCY); …
AntonioHS
  • 1,360
  • 10
  • 25
1
vote
3 answers

How to correctly format text based on currency

In my application a calculation is performed which display the text to the GUI. The application multiplies a user given amount by a defined number (Say 0.85) to create a total (User types in 2, application works out 2 x 0.85). As the number that is…
Jamie Keeling
  • 9,806
  • 17
  • 65
  • 102
1
vote
0 answers

Yahoo Currency API Java multiple currency requests

I'm having trouble grabbing multiple currencies at once from yahoo, the code produces the first request but not the second. public double getRate(String from1, String to1, String from2, String to2) { try { URL url = new…
dbrasco
  • 11
  • 1
1
vote
3 answers

Calculating interest in objective c?

What is a simple piece of code to read a stored number, calculate interest on the stored value, say $100, at a rate of %10. Then I store the new value in place of the old one. I was working towards this: NSNumber *bankTemp = [[NSNumber alloc]…
Moshe
  • 57,511
  • 78
  • 272
  • 425
1
vote
1 answer

Magento price format showing wrong after changing language

Price formatting shows wrong after changing the default language English to another language. In my main website it outputs like Rs.1,200,000.00 but after changing the language from English to another language its outputs like Rs.1.200.000,00. How…
monojit
  • 605
  • 5
  • 19
1
vote
1 answer

How to maintain records of virtual money in MySQL?

I'm pretty new to PHP use of MySQL and I needed to learn about the Balance System (Virtual Money) to make my website functional so, first of all I got the inserting money system working: /* MySQL Begin */ $_CONFIG['mysql']['dbhost'] =…
1
vote
1 answer

Currency Formatting with Delphi

I am trying to writte a code in Delphi, which will be displaying a given number in currency format like this: Now it works if filled whole number and another field until any paramater is updated. I'd be happy to have a code which would displaying…
user5021612