Assume I have the following decimal number that I have to format so that every thousand should be separated with a space:
897.11 to 897.11
1897.11 to 1 897
Sweden Use thousand separator as Space(" ") and Decimal point separator as Comma(,). We can achieve this in the following way.
decimal myNumbber = 5878.476M;
var swedishCulture = new CultureInfo("sv-SE");
swedishCulture.NumberFormat.NumberDecimalSeparator = ",";
swedishCulture.NumberFormat.NumberGroupSeparator = " ";
var s = myNumbber.ToString("#,###.00", swedishCulture);
Which gives the output
"5 878,48"