GUI ScreenIO for Windows

 ScreenIO.com


Date Edit Controls

When you define a date field, you specify how your date will is stored internally, and how it is to be displayed.  You can also specify the use of custom separators instead of the locale standard date separators.

You can get fancy by using a date picker control, which lets you do this:

The internal format determines the size of the COBOL PICTURE clause (six or eight digits) and the format of the date GUI ScreenIO returns to your program in the date field.  

Most programmers these days would use CCYYMMDD.

The display format is determined by your locale.  

If you use a date picker control, GUI ScreenIO displays and accepts dates using the "fancy" control, which will display either the long or short format date (your choice), and which also provides the choice of a popup calendar or up-down arrows for selecting the date (in addition to simply keying it in).

The date picker control mandates an eight digit date.

If you don't select the date picker control, GUI ScreenIO handles the date field much like a regular edit control.  That is, you don't get the fancy stuff; it's just a numeric date field with date separators inserted where they belong.   

GUI ScreenIO always ensures that dates are valid, including leap year tests, provided the date is after the more-or-less universal adoption of the Gregorian calendar in 1753.  Dates earlier than this will not be consistent with the Julian calendar then in use.

If you use a date picker and you set the date to zero, GUI ScreenIO will automatically load the current date to the field.  Also, if you use a date picker, you must use an eight-digit date format.

Your date field will look like this in the panel copybook:

05 MY-DATE-FIELD                 PIC 9(8).

Again, the date will be passed back to you according to the format you selected.  If you selected CCYYMMDD, March 8, 2000 will be stored as 20000308.

Related topics:


2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom