on 04-26-2010 9:06 AM
Hi ALL,
we recently had a requirement where the unit price needed to be change from 2 decimal to 4 decimal.
we have defined a variable int he global defination with 4 decimal and printing the same in the form but the output i.e decimal places is printing incorrect. eg the actual figure is 1.233, but it prints as 12.3300.
plz suggest as to what is the issue.
regards
Arvind Kumar
Hi All,
we solved the issue by defining a temp variable with 4 decimal and the storing the actual value in it. once the value is stored, depending on the output required divide it by 2 or 3 and then print the value in temp variable.
Thanks
Arvind Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How did you define and populate the variable? Is it a numeric data type in a program or ??
If in a program, if both input and target are numeric types, the calculation should always be correct...
do you have (.4)& at the end of your variable name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.