Change numeric format

Hi to everyone!

I need to change my numeric format from “1234567.98” to “1.234.567,89”

thank you in advance

grafik

YourDoubleVar.ToString("N", System.Globalization.CultureInfo.CreateSpecificCulture("de-DE"))

N
N1 = XXX,1 Digit Rounding after comma
N2 = XXX,2 Digits Rounding after comma

Hi @lecosta

Try this:

 FormattedNumber= Decimal.Parse(OriginalNumber).ToString("N2", System.Globalization.CultureInfo.GetCultureInfo("es-ES"))

Regards

Hi @lecosta

Check out the below image for better understanding:

Input= "1234567.98"
Message Box-> Decimal.Parse(Input).ToString("N2", System.Globalization.CultureInfo.GetCultureInfo("es-ES"))

Regards

Thank you very much!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.