Re: Millennial Fun with Oracle Dates
Date: Fri, 07 Jan 2000 01:05:32 GMT
Message-ID: <853e4k$obe$1_at_nnrp1.deja.com>
Valeri,
[Quoted] Forms 4.5 against an Oracle7 database and 5.0 against an Oracle8
database. Same deal either way. You got the right answer, but you
asked the wrong question. Try your code, with '01.01.1999' and see
what happens. As long as the date you are placing in the GLOBAL is in
the same century as SYSDATE, there is no problem; that's why your test
worked.
Paul
In article <38746217.4A81DB1A_at_dd.ru>,
Valeri Sorokine <vsorokin_at_dd.ru> wrote:
> Hello Paul,
>
> Which version of Oracle Forms do you use?
>
> After this code in Forms 6.0.5.33.0:
>
> declare
> tmp_Date DATE;
> begin
> :GLOBAL.TEST_DATE := TO_DATE('01.01.2000','DD.MM.YYYY');
> tmp_Date := :GLOBAL.TEST_DATE;
> message(TO_CHAR(tmp_Date,'DD.MM.YYYY'));
> end;
>
> I got 01.01.2000 ...
>
> Have a Happy Millennium!
>
> Valeri
>
> pberetta_at_my-deja.com wrote:
> >
> > On a (slightly) more serious note, just in case someone out there
has
> > not already been 'bitten' by this one (or figured out what the heck
is
> > going on if they have) -
> > In Oracle Forms, if you are storing a date to a GLOBAL variable,
then
> > populating a date with the GLOBAL, the results may suprise you now
that
> > we are in 2000. Oracle stores the date to the GLOBAL as a 9
character
> > string in 'DD-MON-YY' format, when it is reconverted to a DATE, it
> > assumes the current century - not what you want if the original date
> > was in the 1900's!
> > Paul
>
> <skip>
>
> --
> Valeri Sorokine
> Oracle Certified Application Developer, Rel.2
> ProSoft, Russia, Moscow, Information Systems Division
> Phone: +7 (095) 234 0636 ; FAX: +7 (095) 234 0640
> E-mail: vsorokin_at_dd.ru ; http://www.dd.ru
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Jan 07 2000 - 02:05:32 CET
