1. Günther Limberger
  2. PowerBuilder
  3. Thursday, 12 May 2022 10:23 AM UTC

I want to format a decimal (money) to the form "12.345,56" and use the command string(ldec_amount,"##,###,###,###,##0.00")
Normally it works well, but from time to time (rare) I get a char(160) instead of the dot.
What could be the reason for that? Is it the configuration?

John Fauss Accepted Answer Pending Moderation
  1. Thursday, 12 May 2022 18:06 PM UTC
  2. PowerBuilder
  3. # 1

If you're having issues with the PowerScript function, have you considered writing your own function? It should be fairly easy to do, given what you've described.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 12 May 2022 13:55 PM UTC
  2. PowerBuilder
  3. # 2

>>> form "12.345,56" and use the command string(ldec_amount,"##,###,###,###,##0.00")

I'll assume you meant to say the format is 12,345.56, which matches the string command above.

Have you trined string (#,##0.00)? If I recall, all leading digits will use the "#" format command and you do not need to specify them. This will declutter the command and might prevent confusion.

Comment
  1. Olan Knight
  2. Thursday, 12 May 2022 14:13 PM UTC
That's a legitimate and viable alternative.

Either way, we've recommended the same thing which is to get rid of all the extra "##########"s from the STRING command! :)
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 12 May 2022 15:13 PM UTC
Hi Roland .. yes, I suspect that this issue is related to the App user's "Regional" settings.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 13 May 2022 07:28 AM UTC
Hi,

Just like with datawindow columns, we should ALWAYS use "#,##0.00", independently of any regional settings in windows. PB is supposed to automatically apply the correct format according to regional settings.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.