Skip to main content

[archive] Date Verification/Format

  • July 9, 2007
  • 2 replies
  • 0 views

[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

2 replies

[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
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.

[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
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