Using number
display formats
Applies to
Display formats
Description
A number display format can have up to four sections. Only the first
is required.
|
1 |
Positive-format;negative-format;zero-format;null-format |
The following table shows characters that have special meaning in
number display formats.
|
Character |
Meaning |
|---|---|
|
# |
A number |
|
0 |
A required number; a number will display for every 0 |
Dollar signs, percent signs, decimal points, parentheses, and spaces
display as entered in the mask.
These keywords tell PowerBuilder to determine an appropriate format
based on system settings:
-
[General]
-
[Currency]
Examples
The following table shows how the values 5, -5, and .5 display when
different format masks are applied.
|
Sample format |
5 |
-5 |
.5 |
|---|---|---|---|
|
[General] |
5 |
-5 |
0.5 |
|
0 |
5 |
-5 |
1 |
|
0.00 |
5.00 |
-5.00 |
0.50 |
|
#,##0 |
5 |
-5 |
1 |
|
#,##0.00 |
5.00 |
-5.00 |
0.50 |
|
$#,##0;($#,##0) |
$5 |
($5) |
$1 |
|
$#,##0;-$#,##0 |
$5 |
-$5 |
$1 |
|
$#,##0;[RED]($#,##0) |
$5 |
($5) |
$1 |
|
$#,##0.00;($#,##0.00) |
$5.00 |
($5.00) |
$0.50 |
|
$#,##0.00;[RED]($#,##0.00) |
$5.00 |
($5.00) |
$0.50 |
|
0% |
500% |
-500% |
50% |
|
0.00% |
500.00% |
-500.00% |
50.00% |
|
0.00E+00 |
5.00E+00 |
-5.00E+00 |
5.00E-01 |