Re: Date Format Mask Question on Forms5

From: Bob Bain <bob.bain_at_terra-nova.e-mail.com>
Date: Wed, 15 Dec 1999 10:11:26 -0000
Message-ID: <3QJ54.4$654.87_at_news.colt.net>


Suggest that you read ORACLE document 62853.1.

This basically states that in Forms 5 and onwrads you can sepcify one or more input date masks that will be used if you don't explicitly set the input mask on the item.

The registry keys to set are

    HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/FORMSnn_USER_DATE_FORMAT and     HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/FORMSnn_OUTPUT_DATE_FORMAT

(nn is the version of forms you are running, i.e. 50)

The input date format can accept up to 6 formats (I believe) in forms5 but many more in Developer 6.

The format masks need to seperated by a '|' character in the USER_DATE_FORMAT, i.e. DD-MON-YYYY|DDMMYYYY|DD/MM/YYYY etc. etc.

The key FORMSnn_OUTPUT_DATE_FORMAT is used to specify what format you want your date to be output in. It will accept only one format mask.

Hope this all helps

<pberetta_at_my-deja.com> wrote in message news:836m70$uh9$1_at_nnrp1.deja.com...
> Adri,
> Yes, but it's a little round-about, hope you can follow this
>
> 1. create a non-database date item in the same block, I'll call it
> DUMMY, place it just above your date item in the Object Navigator.
>
> 2. set DUMMY's format mask to 'DDMMYYYY'.
>
> 3. in the layout editor, make DUMMY the same size as your date item
> and superimpose it over the date item.
>
> 4. set your actual date's Visible property NO and its Autoskip property
> to YES, DUMMY's visible property YES
>
> 5. In a form level WHEN-NEW-FORM-INSTANCE trigger,
> SET_ITEM_PROPERTY('BLOCK.DUMMY',VISIBLE,PROPERTY_TRUE);
> SET_ITEM_PROPERTY('BLOCK.DATE',VISIBLE,PROPERTY_FALSE);
>
> 6. In a item level POST-TEXT_ITEM trigger on DUMMY,
> :block.date := substr(:block.dummy,1,2) || '/' || substr
> (:block.dummy,3,2) || '/' || substr(:block.dummy,5,4);
> SET_ITEM_PROPERTY('BLOCK.DUMMY',VISIBLE,PROPERTY_FALSE);
> SET_ITEM_PROPERTY('BLOCK.DATE',VISIBLE,PROPERTY_TRUE);
> :block.dummy := NULL;
> GO_ITEM('BLOCK.DATE');
>
> Hope this helps,
> Paul
>
>
>
> }Adri,
> Yes but it's a little round-about, hope you can follow this
> 1. create a non-database date item in the same block, I'll call it
> DUMMY, place it just above your date item in the Object Navigator.
> 2. set DUMMY's format mask to
>
>
> In article <836910$t8g$1_at_ctb-nnrp1.saix.net>,
> "AH ROBERTS" <a3roberts_at_yebo.co.za> wrote:
> > Hi folks,
> >
> > I have an date item on a form. Format Mask property is set to
> DD/MM/YYYY.
> > Maximum length is 10.
> > If you enter the date 13/10/1999 or 13 10 1999 or 13.10.1999 it
> changes the
> > date to 13/10/1999.
> >
> > Is it possible to set the format mask to a value which will allow the
> user
> > to enter 13101999? The date must then be automatically formatted with
> the
> > '/' in between. (user request)
> > The result of above input is 13/01/0099.
> >
> > I have tried the following DD"/"MM"/"YYYY and DDFM/MMFM/YYYY.
> > Basically it gives the same incorrect output.
> >
> > I tried to manipulate the date in the 'When Validate Item' trigger ,
> but for
> > the follwing example 13121999, you get the error message 'Day of the
> month
> > must be between 1 and 12', because it takes 21 as the month value.
> > Is it possible to write code in some trigger which will fire before
> the
> > error message from the format error is shown?
> >
> > Any suggestions or help will be appreciated!
> > Thanks,
> > Adri
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Dec 15 1999 - 11:11:26 CET

Original text of this message