1 Reply Latest reply on Jul 28, 2020 8:41 PM by Velu Angusamy

    NumberToString and NumberToDisplayString

    4290008

      Both NumberToString and NujmberToDisplayString have the same syntax.  I got the same result in an AE program:

          MessageBox(0, "", 0, 0, NumberToDisplayString("%10.2v", 12345.6));       --> 12,345.60

          MessageBox(0, "", 0, 0, NumberToString("%10.2v", 12345.6));                  --> 12,345.60

       

      What is the difference between these two functions?

        • 1. Re: NumberToString and NumberToDisplayString
          Velu Angusamy

          Hi User - Both are almost almost identical  except that ‘NumberToDisplayString’ will use the current user’s personalization settings to determine the display format for large numbers and decimal values. ‘NumberToString’, on the other hand, is based purely on the format string passed to the function at run-time.

           

          See quick test.

           

          Goto My personalization and change the decimal separator to /.

           

           

          Now i got the o/p

           


          MessageBox(0, "", 0, 0, NumberToDisplayString("%10.2v", 12345.6));  ==>12,345/60 (0,0)

          MessageBox(0, "", 0, 0, NumberToString("%10.2v", 12345.6));      ===> 12/345.60 (0,0)

           

           

          Its documented in poeoplebooks.

           

          Hope this helps!

           

          -Velu