Howdy,
double d = 12345.00;
DecimalFormat df = new DecimalFormat("0");
String s = df.format(d);Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Cui Xiaojing-a13339 [mailto:[EMAIL PROTECTED] >Sent: Friday, February 27, 2004 1:38 AM >To: 'Tomcat Users List' >Subject: Number Format > >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: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
