defaultDateFormat (EGL system variable)

The strLib.defaultDateFormat system variable specifies a pattern that EGL uses to convert a DATE type to text and a text type to DATE.

For more information about converting DATE type to text and vice versa, see Converting date/time types to text.

EGL uses the following process to determine the initial value of strLib.defaultDateFormat:
  • In a Java environment, EGL uses the defaultDateFormat build descriptor option to set the vgj.default.dateFormat Java runtime property at generation time. At run time, EGL uses the vgj.default.dateFormat property to initialize strLib.defaultDateFormat. If the vgj.default.dateFormat property is not set, EGL uses the Java locale to set strLib.defaultDateFormat. If the Java locale does not work, EGL uses "MM/dd/yyyy".
  • In a COBOL environment, EGL uses the defaultDateFormat build descriptor option to set strLib.defaultDateFormat directly for main programs. If the build descriptor option is not specified, EGL uses the default date format from the user-definable NLS module in the runtime system. For more information, see Default formats in COBOL.
  • In JavaScript, EGL uses the defaultDateFormat build descriptor option to set strLib.defaultDateFormat, which you can update at run time.

You can change the initial value at any time. For more information on the defaultDateFormat build descriptor option, see defaultDateFormat (build descriptor option).

For more information about the characteristics of a date format pattern, see Date/time masks and format specifiers.

strLib.defaultDateFormat has the following characteristics:
Primitive type
STRING
Data length
Varies
Value saved across segments
Yes

Compatibility

Table 1. Compatibility considerations for defaultDateFormat
Platform Issue
Java generation Calling sysLib.setLocale() causes EGL to reinitialize strLib.defaultDateFormat, strLib.defaultTimeFormat, and strLib.defaultTimestampFormat to the format associated with the Java locale specified.