The following table shows
some example display patterns and the results of formatting some
example input values (user input or bound data) using the display
pattern. The formatted results are delimited by double quotation
marks so that you can see where spaces would appear in the result.
The quotation marks are not part of the result. In these examples,
the locale is English (USA).
Pattern
|
Input value
|
Formatted value
|
|
|
|
zzz,zz9.99
|
123456.1236
123456.4
123456
|
“123,456.12”
“123,456.40”
“123,456.00”
|
$Z,ZZ9.99
|
123.4
|
“ 123.40”
|
$z,zz9.99CR
|
1234
-1234
|
“$1,234.00”
“$1,234.00CR”
|
$Z,ZZ9.99DB
|
123
-123
|
“$ 123.00”
“$ 123.00DB”
|
($z,zz9.99)
|
1234
-1234
|
“ $1,234.56 “
“($1,234.00)”
|
zzz9
|
12.0
|
“12”
|
Szzz,zz9.99
|
1234.56
-1234.56
|
“1,234.56”
“-1,234.56”
|
$9,999.99
|
123.4
|
“$0,123.40”
|
$Z,999.99
|
123.4
|
“$ 123.40”
|
99999
|
1234
|
“01234”
|
S999v99
|
-1.23
|
"-00123"
|
S999V99
|
-1.23
123
|
"-001.23”
" 123.00"
|
SZZ9.99
|
12.3
-12.3
|
" 12.30"
"- 12.30"
|
szz9.99
|
12.3
-12.3
|
“12.3”
“-12.3”
|
99.999E
|
12345
0.12345
|
"12.345E+3"
"12.345E-2”
|
The table below shows the results of converting some example
input values (user input or bound data) into raw values using an
edit pattern or data pattern.
Custom pattern
|
Input value
|
Raw value
|
99V99
|
1050
3125
|
10.50
31.25
|
99.999E
|
12.345E3
12.345E-2
|
12345
0.12345
|
z999
|
150
0150
|
150
150
|
z,zz9.99
|
10.50
3,125.00
|
10.50
3125.00
|
$z,zz9.99DB
|
$1,234.00
$1,234.00DB
|
1234.00
-1234.00
|
|
|
|