on 03-10-2011 9:07 AM
Hi
My requirement is to format the amount field, when I am using the simple type and setting the format as ###,##0.00 then it is rounding off the value. Foe example say the amount is 3,567.236 in this case it rounds it off to 3,567.24 which I do not want we want the value to display as 3,567.23. Does anyone have any idea how this can be achieved.
Thank you
Regards,
Preet
Use the following :
BigDecimal bigDecimalh = new BigDecimal("22.335642");
bigDecimalh = bigDecimalh.setScale(2, BigDecimal.ROUND_DOWN);
Regards,
Himanshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.