dateFormat
The dateFormat property identifies the format that EGL uses to parse or display dates.
- "pattern"
- The pattern consists of characters that describe a date format; see "Date, time, and timestamp format specifiers."
- defaultDateFormat
- This is the format you specified in the defaultDateFormat build descriptor option; for more information, refer to the EGL Generation Guide. If you did not specify this build descriptor, EGL uses either the local Java™ default date format, or the string "MM/dd/yyyy".
- eurDateFormat
- The pattern "dd.MM.yyyy", which is the IBM® European standard date format.
- isoDateFormat
- The pattern "yyyy-MM-dd", which is the date format specified by the International Standards Organization (ISO).
- jisDateFormat
- The pattern "yyyy-MM-dd", which is the Japanese Industrial Standard date format.
- usaDateFormat
- The pattern "MM/dd/yyyy", which is the IBM® USA standard date format.
- systemGregorianDateFormat
- An 8- or 10-character pattern that includes dd (for numeric day),
MM (for numeric month), and yy or yyyy (for numeric year), with characters
other than d, M, y, or digits used as separators.
For COBOL programs, the system administrator for EGL runtime services sets the format at installation.
For Java™ programs, the format is in this Java™ runtime property:vgj.datemask.gregorian.long.NLS- NLS
- The NLS (national language support) code that is specified in
the vgj.nls.code Java™ runtime property. The code is one of those
listed for the targetNLS build descriptor
option. Uppercase English (code ENP) is not supported.
For more information about vgj.nls.code, refer to the EGL Generation Guide.
- systemJulianDateFormat
- A 6- or 8-character pattern that includes DDD (for numeric day)
and yy or yyyy (for numeric year), with characters other than D, y,
or digits used as separators.
For COBOL programs, the system administrator for EGL runtime services sets the format at installation.
For Java™ programs, the format is in this Java™ runtime property:vgj.datemask.julian.long.NLS- NLS
- The NLS (national language support) code that is specified in
the vgj.nls.code Java™ runtime property. The code is one of those
listed for the targetNLS build descriptor
option. Uppercase English (code ENP) is not supported.
For more information about vgj.nls.code, refer to the EGL Generation Guide.
Length considerations for dates
In a form, the field length on the form must be greater than or equal to the length of the field mask that you specify. The length of the field must be long enough to hold the internal format of the date.
| Format type | Example | Length of form field | Minimum length of page field (character type) | Valid length of page field (numeric type) |
|---|---|---|---|---|
| Short Gregorian | yy/MM/dd | 8 | 8 | 6 |
| Long Gregorian | yyyy/MM/dd | 10 | 10 | 8 |
| Short Julian | DDD-yy | 6 | 6 | 5 |
| Long Julian | DDD-yyyy | 8 | 8 | 7 |
I/O considerations for dates
Data entered into a variable field is checked to ensure that the date was entered in the format specified. The user does not need to enter the leading zeros for days and months, but can specify (for example) 8/5/1996 instead of 08/05/1996. The user who omits the separator characters, however, must enter all leading zeros.
Compatibility
| Data item | VGUI record | Console UI | Text Form Java™ | Text Form COBOL | Print Form Java™ | Print Form COBOL |
|---|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes | Yes |