Setting Decimal and Thousand Character in my App

Hi folks,
i want to have only one output for numbers in my application. The Settings which are coming from the control panel for these characters should be ignored.

I can read it with GetLocaleInfo, but I can't set it with SetLocaleInfo. But when i format a number these changes have no effect. The number is displayed the same way.
Does anybody know how to change the current characters for the decimal and thousand character.

Who is Participating?
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Yes, simply "escape" the format:

FORMAT(100.4, " #0\,000") will produce this output:
independant of the regional settings. The backslash will make the , to be forced, and not interpreted using the regional settings

olkaAuthor Commented:
thank you,
but now i have the problem with great number
format(23412956.67, "#\.##0\,00")  => output is 234.129,57

but i want 23.412.956,67
It's a bit of a pain that you can't escape a decimal point and still get the format function to understand it as a d.p.
You're best off writing your own little routine to do this - having the added advantage of providing a single point to change if you need to extend it to do different formats.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.