| Symbol | Meaning |
|---|---|
| 0 | Represents exactly one number |
| # | Represents a number. If this place is empty, no number is spent |
| . | Decimal separator |
| - | Minus indicatior |
| , | Group separator. The with of the group in numbers, will be defined by the number of format indicators (0 or #) between group separators (,) and dezimal separators(..) |
| E | Separates mantissa and exponent in exponential representation |
| PFormattedField • SFormattedField • TFormattedField | |
Examples for using self defined decimal formats
| example format | Numerical value | Result | Explanation |
|---|---|---|---|
| #0.0 | 144 | 144,0 | At least one integer digit and exactly one right-of-comma position |
| #0.000 | 144 | 144,000 | At least one integer digit and exactly three right-of-comma positions |
| 000000.000 | 144 | 000144,000 | Exactly seven visible integer digit and exactly three right-of-comma positions |
| #.000000 | 144 | 144,000000 | No integer digit if the number is smaller than 1 and exactly six right-of-comma positions |
| #,###,##0.000 | 2769,3518 | 2.769,352 | At least one integer digit and exactly three right-of-comma positions. Larger numbers are represented with thousand separators |
| 0.000E00 | 144 | 1,440E02 | One pre and three right-of-comma positions, exponential representation with at least two numbers in the exponent |
More informations can be found in the Java-Dokumentation
| Symbol | Meaning |
|---|---|
| # | Represents a numeric character |
| @ | Represents an alphabetical character |
| Static character | Each characterexcept # and @ |
| SFormattedField • TFormattedField | |
Examples for input formatting:
| Example mask | Possible input | Explanation |
|---|---|---|
| ##.##.#### | 10.10.2000 | Gives a format of date with four digit year. Only numbers can be entered |
| @@@ | ABC | Permits the input of exactly three alphabetical indications |
| ##-@@@@-A## | 123-ABCD-A11 | Mixed formatting |
| Value | Input | Result | Explanation |
|---|---|---|---|
| No format | Free text | Free text | Free text without restrictions |
| Numbers | 10000 | 10.000 | Considers thousand separator |
| Dates | 1.01.05 | 1.01.2005 | Date with four year digit |
| Time, long | 13:00:00 | 13:00:00 | Time Hours:Minutes:Seconds |
| Time 24 hours | 13:00 | 13:00 | Time Hours:Minutes |
| Euro | 10 | 10,00 € | Currency in Euro |
| Currency | 10 | 10,00 € | Localized currency |
| Time stamp hours | 5:70 | 6:10 | Length of time under indication of Hours:Minutes |
| Fixed namber | 555,5 | 556 | Number without right-of-comma positions |
| Per cent | 555,5 | 556% | Fixes number with percentage signs |
| Month/Year | 5 | 5.2005 | Indication with Month.Year inclusive completion on the current year |
| Standard date | 5.5.2005 | 5.5.2005 0:00:00 | Date inclusive Hours:Minutes:Seconds |
| Password | Freitext | ******** | Password field covers the input |
| User defined decimal | 10000,10 | 10.000,1 | Decimal format of numbers with consideration of thousend separators |
| Date with filling zeros | 1.1.05 | 01.01.2005 | Format of date with consideration of leading zeros |
| Date without seconds | 10.10.2005 23:59 | 10.10.2005 23:59 | Format of date with consideration of Hours:Minutes |
| PFormattedField • SFormattedField • TFormattedField | |||