An edit pattern is a defined mask that controls the display and input format for fields. Edit patterns are classified as text, numeric, date, time, or timestamp. Each edit pattern class is associated with a set of supported edit pattern components. Some components display variable data, others contain formatting instructions, while others display the literal component itself. Any two components may be separated by a space or a supported literal character such as a slash (/), hyphen (-), period or decimal point (.), or colon (:).
The Business System Defaults menu lists two edit pattern options:
You can add new edit patterns for fields with data display requirements different from the displayed defaults. You can delete or modify any edit pattern that is supplied or that you add.
Edit patterns for a date typically include three components: year (YYYY), month (MM), and day (DD). The edit pattern, YYYYMMDD represents a style where the 4-digit year, the 2-digit month (with leading zeroes), and the 2-digit day are displayed contiguously, that is, without separators. The default edit pattern for Date is YYYY-MM-DD, where the hyphen is used as the separator; the default for Time is HH.MM.SS, where the period is the separator. Timestamps are stored internally as a combination of all the date and time values, plus microseconds. This value is stored in the following edit pattern: YYYYMMDDHHMISSNNNNNN.
The following table lists separators by class and description.
|
Class of Edit |
Edit Pattern Separators |
Separator Description |
|---|---|---|
|
Date, Time, Timestamp, Text. Mixed Text, and DBCS Text |
A hard space or one of the following symbols: / (slash) . (period) : (colon) - (hyphen) |
A literal character or space used to separate the components of the edit pattern. |
|
Numeric
|
. (decimal point) |
The character used to separate the integer component from the mantissa component of an edit pattern for a decimal number. |
|
, (comma) |
The character used to separate periods of a number over 999 and displayable after start of significance. Entry is optional. |
The following table describes components that can be used when specifying an edit pattern for the following types of data: numeric, text, date, time, or timestamp. You may use these components to build new edit patterns or modify those that exist.
|
Class of Edit |
Edit Pattern Components |
Component Description |
Valid Value and Default Value |
|---|---|---|---|
|
Date and Timestamp
|
C |
1-digit century code |
Valid values: 0 through 9 inclusive, representing centuries as follows: 0 - 1900 1 - 2000 2 - 2100 3 - 2200 4 - 2300 5 - 2400 6 - 2500 7 - 1600 8 - 1700 9 -1800 |
|
YYYY |
4-digit year |
Valid values: 1-, 2-, 3-, or 4-digit number, where leading zeroes are significant. The value must be between 1600 and 2599, or 0 (zero). Default value for omitted leading digits: correct digit for current year Default value for unspecified component: current year unless specified date components are zeroes, then 0000. |
|
|
Date and Timestamp
|
YY |
2-digit year |
Valid values: 2-digit number, where leading zeroes are significant. No default; if specified in the edit pattern, a value must be entered. |
|
MM |
1- or 2-digit number for month of the year |
Valid values: 1 through 12 representing the month, or 0 (a special case). Default value for unspecified component: current month unless specified date components are zeroes, then 00. |
|
|
DD |
1- or 2-digit number for day of the month |
Valid values: 1 through 31 representing the day, or 0 (a special case). Default value for unspecified component: current day unless specified date components are zeroes, then 00. |
|
|
Time and Timestamp
|
HH |
1- or 2-digit number for hour of the day, using 24-hour notation. |
Valid values: 0 through 23; Default: 0 |
|
MI |
1- or 2-digit number for minute of the hour. |
Valid values: 0 through 59; Default: 0 |
|
|
SS |
1- or 2-digit number for second of the minute. |
Valid values: 0 through 59; Default: 0 |
|
|
Timestamp |
N, NN, NNN, NNNN, NNNNN, NNNNNN |
1- to 6-digit microsecond value, where the number of Ns determines precision. The value is aligned to an implied decimal point. |
Valid values: 0 through 999999, where leading zeroes are significant and trailing zeroes are insignificant. Default: 000000 |
|
Text
|
X |
One or more 'Xs, where the number of 'Xs, literals and separators does not exceed the field length. Spaces are significant. |
Valid values: All characters in the current codepage, including alphanumeric characters and symbols but excluding DBCS characters. Default: nothing |
|
A-L, N-Z, 0-9, No DBCS Characters |
Literal text composed of all alphanumeric characters except 'X'. |
Valid value: as is. |
|
|
Mixed Text
|
M |
One or more 'Ms, where the number of 'Ms, literals and separators does not exceed the field length. Spaces are significant. A single 'M' represents one byte. Two 'Ms, are required to hold a DBCS character. |
Valid values: All characters in the current codepage, including alphanumeric characters, symbols and DBCS characters. Default: nothing |
|
A-L, N-Z, 0-9, Any DBCS Character |
Literal text composed of all alphanumeric characters and DBCS characters with the exception of the single byte 'M'. |
Valid value: as is. |
|
|
DBCS Text
|
DBCS:X |
One or more DBCS:'Xs, where the number of bytes of DBCS:'Xs, literals and separators does not exceed the field length. Spaces are significant. |
Valid values: All DBCS characters in the current codepage. All single byte characters are excluded. Default: nothing |
|
Any DBCS Character |
Literal text composed of any DBCS character. |
Valid value: as is. |
|
|
Numeric
|
* |
Asterisk line leader fill character preceding data |
Valid values: as needed to fill field. |
|
$ |
Floating dollar sign |
Valid value: as is. |
|
|
9 |
Numeric characters, including leading zeroes |
Valid values: 0 through 9, inclusive |
|
|
Z |
Numeric characters, excluding leading zeroes |
Valid values: 0 through 9, inclusive; 0s are suppressed until significance has been established. |
|
|
0 |
A literal zero |
Valid value: as is |
|
|
+ |
For signed data, displays both plus sign (+) for positive data and minus sign (-) for negative data. |
Valid values: + (plus sign) and - (minus sign) |
|
|
- |
For signed data, displays minus sign (-) for negative data. |
Valid values: - (minus sign) |
|
Copyright © 2013 CA.
All rights reserved.
|
|