I Want to insert A comma into 开发者_高级运维adecimal type how i can do it ?
Replace it with a dot.
insert YourTable
(DecimalColumn)
select replace('3,14',',','.')
This might be your answer - Formatting Numbers as Strings with Commas in place of Decimals
The top answer there is:
string.Format(System.Globalization.CultureInfo.GetCultureInfo("de-DE"), "{0:0.0}", 4.3);
Decimal representation is completely depends on culture. So you need to provide appropriate culture during convertion, like in code below:
double test = 8888.33;
MessageBox.Show(string.Format(System.Globalization.CultureInfo.GetCultureInfo("EN-US"),"{0:0,0.0}",test));
精彩评论