1. Dionizas Antipenkovas
  2. PowerBuilder
  3. Tuesday, 11 June 2024 13:26 PM UTC

Hello Everyone,

working on extending existing PB application to support crypto, thus need to adopt application to work with DEC(27,18). PB support such datatype without a problem, but what about display formats? is there something similar to C#'s {0:#,0.####} to cut not needed digits at the end of number so only actual numbers and decimal places will be show?

If I use  [General] format, the number 0.1342 is shown as 0.134200000000000, but I would like PB to cut not need zeros at the end. However, if number is 0.134200000000003 it should show 0.134200000000003

how to make PB datawindow show numbers right without additional conversion to string and parsing?

Thanks for advice.

BR,

Dionizas

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 11 June 2024 16:13 PM UTC
  2. PowerBuilder
  3. # 1

Hi Dionizas;

  Have you tried a Display Format of "0.#################0"?

HTH

Regards .. Chris

Comment
  1. mike S
  2. Tuesday, 11 June 2024 16:18 PM UTC
you can also use: 0.0####################

and if you don't want to show a decimal then you use an expression for the format.
  1. Helpful 3
There are no comments made yet.
Dionizas Antipenkovas Accepted Answer Pending Moderation
  1. Wednesday, 12 June 2024 05:05 AM UTC
  2. PowerBuilder
  3. # 2

Thank You Chris!

 

Based on your response, the format I selected for Crypto is:

 

#,##0.#################0

 

Thank You x 3 !

D

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 12 June 2024 12:30 PM UTC
You are most welcome!
  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.