Highlighted
Absent Member.
Absent Member.
282 views

[archive] Date Verification/Format

[Migrated content. Thread originally posted on 05 July 2007]

Hello,
Does anyone have a routine that will verify and format a date that was entered in an entry field or grid cell? What I need is to allow the user to enter a "free form" date (07262007, 07-26-2007, 7-26-07, 7/26/2007, etc), then verify it and convert it to a MM-DD-YYYY format (07-26-2007).
Are there any date verification routines in the Acucobol library?

Thanks
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Date Verification/Format

To my knowledge there are no routines within ACUCOBOL-GT to validate dates. There are a couple sample programs intdate.cbl and dateint.cbl but you would need to set these up with some logic to get date validation.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Date Verification/Format

As an entry-field you can use for Example:

03 date-entry, short-date, value b-wv,
col 98, size 12, show-none.

Its included sind AcuCobol 7 or 6? I think since 7.

Short description from the manual:


The date entry control provides a convenient way for users to enter date or time values. The date entry control always stores a complete date and time, even though, in most cases, only a portion of this information is shown to the user. The control's initial value is the date and time that the control is created.

The date entry control includes the following special features for date and time handling:

* An integrated drop-down calendar from which users can select a date
* Standard date validation
* Flexible date and time formatting options
* A display format independent of the one used by your program to store dates and times
* In some instances, automatic localization




For all other we use a callable Programm which i wrote to validate Date, get Calendar-Week and so on.

David
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.