Design Tools & Output Technologies - JDE1 (MOSC)

MOSC Banner

Conversion to/from string to Math Numeric and decimal separator

edited Apr 7, 2015 10:04AM in Design Tools & Output Technologies - JDE1 (MOSC) 1 commentAnswered

We need a reliable way to convert strings to/from Math Numeric data structure regardless of the user profile's decimal separator setting (comma or dot). The string will always contain dot (.) as the decimal separator.

Can someone confirm that we can use:

  • ParseNumericStringEx to convert the string with decimal separator dot (.) to a math numeric as follows:

            ParseNumericStringEx(&mnTest, szTest, DEFAULT_SEPARATOR);

           

     Example conversions:

Source (szTest)Destination (mnTest.szString / mnTest.nDecimalPoistion)
50.01

Dot Separator ==> "50.01" / 2

Comma Separator ==> "50,01" / 2

10

Dot Separator ==> "10" / 0

Comma Separator ==> "10" / 0

15.123

Dot Separator ==> "15.123" / 3

Comma Separator ==> "15,123" / 3

         

        

  • FormatMathNumericDefault to do the reverse, i.e.convert a math numeric to the string representation with decimal separator dot (.) :

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center