AS_STRING European Formatted Number

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

AS_STRING European Formatted Number

Post by customaware »

Hi All....

Here is a bit of a mystery....

I have an app that we are developing for the European region and hence all Number attributes are displayed
as #.###,00. ie. Thousands separator is a '.' and the decimal point is a ','

When just using Numbers, everything is fine. All display perfectly.

However, we have a place where we need to take a Number Attribute and then convert it to a string using AS_STRING and
then display the result as a String with the correct format.

Logically, I would have expected to be able to convert it as follows....

MyBO.MyNumberString = AS_STRING(MyBO.MyEuropeanNumber,'#.###,00')

However, that throws a java format error.

But ,

MyBO.MyNumberString = AS_STRING(MyBO.MyEuropeanNumber,'#,###.00') while it does not throw an error.... produces the incorrect resultant string.

Does anyone know a way around this problem please?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
ACDC
Posts: 1143
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: AS_STRING European Formatted Number

Post by ACDC »

I seem to recall something similar, the "," versus the "." is managed by the locale, Kendo culture specific (This could be a clue)
Post Reply