怎样把1234567.89转1,234,567.89
用什么语言都行 如c,c#,php,javascript等语言
一般数据要转换成财务用的数据!
指点一下!!!急!
------解决方案--------------------------------------------------------
string s = 1234567.89m.ToString( "N ");//1,234,567.89
s = 1234567.89m.ToString( "C ");//¥1,234,567.89
s = decimal.Parse( "1234567.89 ").ToString( "N ");//1,234,567.89
------解决方案--------------------------------------------------------
int i = 1234567.89;
string s = i.ToString( "C ");
------解决方案--------------------------------------------------------
double d = 1234567.89D;
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo( "en-US ");
this.textBox1.Text = d.ToString( "N ", cultureInfo);
------解决方案--------------------------------------------------------
double d = 12345678.99;
string s = d.ToString( "###,###,##0.00 ");
------解决方案--------------------------------------------------------
不错