You need to sign in to do that
Don't have an account?
nsattish
Remove trailing zero with decimal format for apex:inputField
How to remove trailing zero with decimal format for <apex:inputField> and <apex:outputField>
Field Definition - Decimal - (10,5) - Five Decimal precision
Example :
Value : 5.01 - SFDC stores and displayed as 5.01000. I need to remove the trailing zeros. Actual value should be 5.01
Hi,
Use Some String Methods like this way
Decimal d= 1.01000;
String s=String.valueOf(d);
Integer i=s.indexOf('.');
String str=s.substring(0,i+3);
Decimal dec=Decimal.valueOf(str);
System.Debug('------------'+dec);
prem
Check this link
http://www.cloudjedi.com/blog/salesforce/formatting-numbers-or-dates-with-visualforce/
To remove trailing zeros from a Decimal type just using the format method