Re: Y2K: froms 4.5 'RR' format

From: <kaiserrj_at_my-deja.com>
Date: Thu, 30 Sep 1999 13:49:18 GMT
Message-ID: <7svpoo$vt1$1_at_nnrp1.deja.com>


The NAME_IN function returns a value of text type,

   not a date type value. This is likely where your    statement is going awry.
To see this: prior to your 'copy' statement,

   add this line...
   message('text date= ' || name_in('block.item1');

Run the form and you will see the date in the format

   that NAME_IN returns.
   DD-MON-YYYY for a DATE item
   DD-MON-YYYY HH24:MI:SS for DATETIME.

    NOTE: use RRRR, 2 digits are not cool.    (I'll assume an item with type property: DATE)

To resolve the problem: format the date inside of your copy

   statement so that a properly formatted TEXT value is    inserted into item2.
Step1 convert item1 (text type) into a date type.

    2 convert the item1-date to a text type in item2-format

          step2 step1
    copy(TO_CHAR(TO_DATE(name_in('block.item1'), 'DD-MON-YYYY'),

        'DD/MM/RRRR'), 'block.item2');

The copy command should work properly after this.

Good Luck, Rich

In article <7ssln3$1hkh$1_at_news5.isdnet.net>,   "Frederic Arslanian" <frederic.arslanian_at_libertysurf.fr> wrote:
> I have the following instruction in forms 4.5 in pl/sql
>
> copy(name_in('block.item1') ,'block.item2');
>
> The date mask are 'dd/mm/rr' in forms.
> NLS_LANG_FORMAT is set to 'DD/MM/RR' in the registry but
> this instruction doesn't not give me back the right date.
>
> If i have to copy then following date '01/10/00' ,
> the date copied in the data base is '01/10/1900' instead of
'01/10/2000'
>
> If i enter a date in the field block.item2 instead of initialize it,
the
> date recorded is correct !!!!
>
> Any help would be appreciate.
>
> Thanks.
>
> Fred..
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Sep 30 1999 - 15:49:18 CEST

Original text of this message