olka
asked on
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.
olka
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.
olka
ASKER
thank you,
but now i have the problem with great number
try:
format(23412956.67, "#\.##0\,00") => output is 234.129,57
but i want 23.412.956,67
but now i have the problem with great number
try:
format(23412956.67, "#\.##0\,00") => output is 234.129,57
but i want 23.412.956,67
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
FORMAT(100.4, " #0\,000") will produce this output:
100,400
independant of the regional settings. The backslash will make the , to be forced, and not interpreted using the regional settings
Cheers