Re: How to accept date in particular format



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
.



Relevant Pages

  • Re: Word 2007 : save as type "Word97 - 2003" doesnt woerk
    ... I think the problem is "by accepting all changes and ... removing all comments". ... Some of them don't like PDF format. ... Track changes settings do not travel with the document. ...
    (microsoft.public.word.docmanagement)
  • Re: Sending a odt file format to windows user
    ... They made a big song and dance about accepting more ... open standards, but since then they have come up with formats that are ... only format accepted by both the ISO and the EEC, ... and how explain that Microsoft want Windows users ...
    (Ubuntu)
  • How to accept date in particular format
    ... I am looking for accepting a date in format mm/dd/yyyy. ... is a newbie question. ...
    (comp.lang.cobol)
  • Re: French numeric formats
    ... Without changing the language settings, I was able to get it with a custom ... > space seperator, but is not accepting the brackets as an available option, ...
    (microsoft.public.excel.misc)
  • Re: Date confusion
    ... > program will work with the date format mm/dd/yyyy and other times it ... > is dd/mm/yyyy and sometimes it will work with both. ... > program the application will work with the mm/dd/yyyy format and some ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)