Forum Discussion

DavidLunn's avatar
DavidLunn
New Contributor
10 years ago

Local decimal seperator

I need to use the local decimal seperator. Utilities.DecimalSeparator seems to be what I want, but 'This property is obsolete and supported for backward compatibility only. The value of this propert...
  • HKosova's avatar
    10 years ago

    Hi David,

     

    aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL)

    will return the decimal separator.

     

    But if what you want to do is convert a string to a number or a number to a string according to the locale settings, use aqConvert.StrToFloat and aqConvert.FloatToStr instead. These methods use the locale-specific decimal separator when producing the output.