Hi everyone, I want to convert a double variable in a string with specific format.
For example:
1238.2
I want that number in the format: 1.238,20 (€)
Is it possible?
Hi everyone, I want to convert a double variable in a string with specific format.
For example:
1238.2
I want that number in the format: 1.238,20 (€)
Is it possible?
ourdouble.tostring
or covert.tostring(Yourdouble)
try this
But I want the format 0.000.000,00
hi @ajgb

Hi,
formattedString = doubleValue.ToString(“N2”, new CultureInfo(“fr-FR”)) + " (€)"
N2: This specifies that the number should be formatted with a thousands separator and two decimal places.
CultureInfo(“fr-FR”): This uses the French culture settings which format numbers with a comma as the decimal separator and a dot as the thousands separator. This will result in “1.238,20”

You can use your local CultureInfo, but keep in mind: fr-FR has configured Space as Group Seperator:

thank you! it works!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.