This content has been marked as final. Show 4 replies
2000 is an int
2000.0 is a double
2,000.00 would be a String due to the comma and 2 zeros after the decimal point.
Can you please clarify what you have and what you want to convert it to.
thanks for reply
2000 is String
2,000.00 is Amount.
I have used convertToString method to convert the amount set into String. It is success convert into String data type, but the display still same as 2,000.00
Have any ideas?
So your question is really: given a number, how to format it in a particular way?
You aren't making sense. What is Amount? As I said in my first reply you cannot have a comma in a primitive (int, long, double etc). The only way for your value to have a comma in it is if it is already a String. If this is the case and you want to display it without the comma then you can simply use substring to pull out the digits.