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
0 answers

SQL Server Money gives wrong values when calculated back

It seems Money has a fixed precision and always have 4 decimals. This causes me problems cause lets say I have a table of items to sell, like below create table #example ( id int, name varchar(50), price money ) If the money column in…
Dave
  • 253
  • 6
  • 14
1
vote
2 answers

Credit calculator generates wrong output

I need to calculate the minimum fixed monthly payment needed in order pay off a credit card balance within 12 months. The right answer should be 310, but I get 340. I was editing code for a few hours, yet didn't find any suitable solution. What is…
Dovi
  • 15
  • 5
1
vote
1 answer

Xcode 6.1.1 Swift returns "Optional("$1234.12")" with formatter

i'm just in playground trying to get this thing to work, but it doesn't want to work for me.. var total = 1234.1234 var formatter = NSNumberFormatter() formatter.numberStyle = .CurrencyStyle println("\(formatter.stringFromNumber(total))") //…
fjaxyu
  • 390
  • 1
  • 3
  • 10
1
vote
0 answers

What is the equivalent of PostgreSQL Money Type in Java?

Here is my postgres table CREATE TABLE bid ( id SERIAL NOT NULL, price MONEY NOT NULL, date TIMESTAMP NOT NULL, customer_id INT NOT NULL, item_id INT NOT NULL, CONSTRAINT bid_pk PRIMARY KEY…
barbara
  • 3,111
  • 6
  • 30
  • 58
1
vote
1 answer

Issue with Magento currency switcher

My currency switcher works fine up till I add a product in my cart. After adding a product in my cart if I change the currency the website crashes and gives me a fatal error of memory: Fatal error: Allowed memory size of 1073741824 bytes exhausted…
Curious Programmer
  • 127
  • 1
  • 2
  • 13
1
vote
2 answers

How to apply maskmoney on div?

I am using maskMoney plugin here. I am trying to apply that mask to a div inner text, however i can't make it work. var_value=$("#b_bouquet_originalvalue").text(); $("#b_bouquet_originalvalue").text($(this).maskMoney('mask',var_value)); …
Harold
  • 23
  • 1
  • 6
1
vote
1 answer

,5 rounds down/up every other calculation

Label4.Text = CDec(TextBox1.Text) * 115 Label5.Text = CInt(Label4.Text) I want Label4 to show the exact number and Label5 to show that number without decimals and rounded up. If I type 11,1 in the textbox, Label4 = 1276,5 and Label5 = 1276 (why…
Chris
  • 13
  • 2
1
vote
0 answers

Thousand separator in excell with Epplus for mobile

I export excel file with Epplus and make string CurrencyFormat = "#,##0.00"; for thousand separator. It's work well on android,windows mobile but on Iphone it show normal number format not my costume format. Thanks for your help.
1
vote
2 answers

NumberFormat vs Joda money

I need to display currency amount with the symbol and format based on currency code. Currently, I'm using a default locale for each currency code since I don't have access to the exact locale along with the currency code and using…
luv-yzag
  • 35
  • 1
  • 6
1
vote
3 answers

Currency Format in C# to shorten the output string

Hey, I currently have a Currency Format method: private string FormatCurrency(double moneyIn) { CultureInfo ci = new CultureInfo("en-GB"); return moneyIn.ToString("c", ci); } I'm looking to adapt this to shorten the string as the currency…
ingh.am
  • 25,981
  • 43
  • 130
  • 177
1
vote
2 answers

ASP .NET: SQL Server Money Type and .NET Currency Type

MS SQL Server's Money Data Type seems to accept a well formatted currency value with no problem (example: $52,334.50) From my research MS SQL Sever just ignores the $ and , characters. ASP .NET has a parameter object that has a Type/DbType property…
Rudi Ramey
  • 21
  • 1
  • 4
1
vote
2 answers

How can i choose indian currency Rupee in opencart storefront?

I have inserted indian rupee in database table. But still i don't know, why in store front currency drop-down indian rupee currency is not displayed. Please let me know hot to add a specific currency ? Thanks in Advance
J Ramesh Fernandez
  • 309
  • 1
  • 8
  • 22
1
vote
0 answers

SSMS Money Data Type Issue

When using the "Money" data type in Microsoft SQL Server Management Server, How do I get the Information in the table to be displayed on a website with only 2 places after the decimal being displayed? I want to see "$14.99" instead of "$14.9900"…
1
vote
1 answer

How to replace currency symbol in angularjs

I want to show one more currencies in a page. For example $100,000 And 100,000€ When I use $filter('currency')(100000, '€') it returns €100,000. But I want it as 100,000€ The problem is I cannot replace the symbol. Any idea ?
Oğuz Can Sertel
  • 749
  • 2
  • 11
  • 26
1
vote
1 answer

Loops & Functions: How do I calculate how many years it takes to accumulate a given amount of money to retire?

I am having a bit of trouble with an assignment for my C programming class; I seem to be stuck on how to correctly implement & terminate a loop within the program. This is my first time asking a question on StackOverflow, so I beg for your patience…
paulalucai
  • 97
  • 2
  • 10