tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Shraibman <...@selectacast.net>
Subject Re: Number Format
Date Fri, 27 Feb 2004 07:18:01 GMT
Quick and easy way: cast to an int

Cui Xiaojing-a13339 wrote:
> Hello All,
> 
> I need to format number 12345.00 to 12345, I use below code to do the format, but the
result is 12,345. Could please  give some advice about how to delete the separator. Thanks
a lot.
> 
>     NumberFormat nf= NumberFormat.getInstance();
>     nf.setMaximumFractionDigits(0);
>     nf.setMinimumFractionDigits(0);
>     ((DecimalFormat)nf).setDecimalSeparatorAlwaysShown(false);
> 
> Regards,
> Xiaojing
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message