VALUE_FORMAT is an optional 30-character alphanumeric field that controls the display format of the field, within the application.
For Numeric Fields, the following characters may be used
Char | Location | Meaning |
---|---|---|
0 | in the Number | Digit |
# | in the Number | Digit, zero shows as absent |
. | in the Number | Decimal separator or monetary decimal separator |
- | in the Number | Minus sign |
, | in the Number | Grouping separator |
; | Subpattern boundary | Separates positive and negative subpatterns |
% | Prefix or suffix | Multiply by 100 and show as percentage |
Input | Format | Output | |
---|---|---|---|
123456.789 | ###,###.### | 123,456.789 | The pound sign (#) denotes a digit, the comma is a placeholder for the grouping separator, and the period is a placeholder for the decimal separator. |
123456.789 | ###.## | 23456.79 | The value has three digits to the right of the decimal point, but the pattern has only two. The format method handles this by rounding up. |
123.78 | 000000.000 | 00123.780 | The pattern specifies leading and trailing zeros, because the 0 character is used instead of the pound sign (#). |
12345.67 | $###,###.### | $12,345.67 | The first character in the pattern is the dollar sign ($). Note that it immediately precedes the left most digit in the formatted output. |
For Date fields, the following characters may be used (case is very important here, the wrong case will give invalid results or errors)
Letter | Component | Examples |
---|---|---|
y | Year | yy or yyyy gives 96 or 1996 |
M | Month | MM will give a 2 digit month, more than 2 M's will give a text name (MMM = Jul) Note:mm is minutes |
w * | Week in year | ww would return a number from 01-53 |
W * | Week in Month | W would return a number from 1-5 |
D * | Day in year | DDD would give the day of the year (001-366) |
d * | Day in month | dd would give the day of the month (01-31) |
F | Day of week in month | F would give a number from 1-7 |
E | Day | Providing more than 4 Es would give full name (i.e Tuesday) |
Time values may be formatted as
h | Hour | h or hh gives 1 or 01 |
mm | Minute | |
ss | Seconds | |
a | AM/PM |
* Format characters indicated show the minimum number of digits to be shown. For example, If the Day of the Year is 6, a format of D would give "6", but DD would give "06" and DDD would give "006"