Re: How to accept date in particular format
- From: Frederico Fonseca <real-email-in-msg-spam@xxxxxxxxx>
- Date: Mon, 31 Oct 2005 12:52:59 +0000
On 31 Oct 2005 04:14:25 -0800, "PradeepR" <pradeep.ravle@xxxxxxxxx>
wrote:
>Hello,
>
>I am looking for accepting a date in format mm/dd/yyyy. The initial
>screen should show current date in this format, for eg.
>10/31/2005.
>I am working on ACU COBOL.
>The date should be accepted at a particular line and column, say line
>4. I have to default it with current date
>and allow the user to edit.
>
>I have tried
>working-storage section.
>01 in-date pic x(10) value " / / ".
>
>procedure division.
>move "10/31/2005" to in-date.
>accept in-date line 4 prompt.
A common way, and one that prevents all possible problems with change
in locales/countries, is to have 3 fields, properly identified as day,
month and year.
Apart from that you need to perform validation within your code to
verify that your users have entered the correct information.
>
>The problem with above is that neither the date gets defaulted, nor
>does it force the user to enter it in proper format. Excuse me if this
>is a newbie question. Any help is appreciated.
>Thanks for your attention.
>
>PradeepR
Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
.
- References:
- How to accept date in particular format
- From: PradeepR
- How to accept date in particular format
- Prev by Date: How to accept date in particular format
- Next by Date: Re: Cobol work?
- Previous by thread: How to accept date in particular format
- Next by thread: Re: How to accept date in particular format
- Index(es):
Relevant Pages
|