What are the defaults for the DATE-ENTRY control DISPLAY-FORMAT property and format styles?
Estimated Reading Time: 1 Minutes
Question:
Answer:
It seems that the default value for the DATE-ENTRY control DISPLAY-FORMAT property and the formats used by the CENTURY-DATE, LONG-DATE, SHORT-DATE and TIME styles are different from those used by ACUCOBOL-GT. What are the formats? How do I get the same behavior as ACUCOBOL-GT?
The display formats used by isCOBOL for the DATE-ENTRY control are as follows:
The
The
The
If no display format styles or properties are specified then
In the United States a common date format is
With ACUCOBOL-GT the exact format depends on settings specified by the user in the Windows Control Panel. To get the same behavior as ACUCOBOL-GT with the most common system settings in the United States, use the following formats:
Instead of the
Instead of the
Instead of the
The
TIME
style is equivalent to DISPLAY-FORMAT "HH:mm:ss"
The
CENTURY-DATE
style is equivalent to DISPLAY-FORMAT "dd/MM/yyyy"
The
LONG-DATE
style is equivalent to DISPLAY-FORMAT "EEEE dd MMMM yyyy"
If no display format styles or properties are specified then
DISPLAY-FORMAT "dd/MM/yyyy"
is used as the default.In the United States a common date format is
DISPLAY-FORMAT "M/d/yyyy"
With ACUCOBOL-GT the exact format depends on settings specified by the user in the Windows Control Panel. To get the same behavior as ACUCOBOL-GT with the most common system settings in the United States, use the following formats:
Instead of the
TIME
style, use DISPLAY-FORMAT "h:mm a"
Instead of the
CENTURY-DATE
style, use DISPLAY-FORMAT "MM/dd/yyyy"
Instead of the
LONG-DATE
style, use DISPLAY-FORMAT "EEEE, MMMM dd, yyyy"
If your code does not currently specify any of the above styles and does not specify the DISPLAY-FORMAT property, use
You can also use properties to specify these formats, and to facilitate transitions from ACUCOBOL-GT, the isCOBOL ISCONFIG utility adds the following properties when translating configuration files:
DISPLAY-FORMAT "M/d/yyyy".
You can also use properties to specify these formats, and to facilitate transitions from ACUCOBOL-GT, the isCOBOL ISCONFIG utility adds the following properties when translating configuration files:
iscobol.gui.date_entry.time="h:mm a"
iscobol.gui.date_entry.century_date="MM/dd/yyyy"
iscobol.gui.date_entry.long_date="EEEE, MMMM dd, yyyy"
iscobol.gui.date_entry.display_format="M/d/yyyy"