Re: Year 2000 problem/easy

From: nix <nix_at_gate.net>
Date: 1996/01/07
Message-ID: <30F082D9.33C4_at_gate.net>#1/1


Rik Roos, Rotterdam wrote:
>
> nix <nix_at_gate.net> wrote:
>
> >deng mei wrote:
> >>
> >> I have a easy solution for the so called "year 2000" problem:
> >> If YY < 75(e.g.,), then it is 20YY;
> >> If YY > 75, then it is 19YY.
> >> So we got another 75 years to relax.
> >>
> >> mdeng_at_julian.uwo.ca
 

> >How about:
 

> >Assume the current year is CCYY (i.e. for this year CC=19 and YY=96)
 

> >if YY < 51 then year = (CC+1)YY
> >else year = CCYY
 

> >This is a generic solution that will always work. Forever!
> >Or at least until I'm long gone. year 9999 might cause problems depending
> >on the data structure used to store the current century.
 

> >In Oracle7 terms there is a format mask call RR that does the same thing
> >for two digit years.
 

> >______________________
> >Robert C. nix_at_gate.net
>
> In Oracle 7 is a preference available
> which can deal with this century-problem.
> You select a two-digits number for this preference
> which tells Oracle to switch to the new century.
>
> E.g.
> It is now 1996 and when you type a date like 01/01/40 (the
> expire-date of your pension ?) Oracle asume it is 01/01/2040.

Yes. It's 'RR'. for example
to_char(to_date('01/01/40','dd/mm/rr'),'yyyy') = '2040' to_char(to_date('01/01/80','dd/mm/rr'),'yyyy') = '1980'

-- 
______________________
Robert C. nix_at_gate.net
Received on Sun Jan 07 1996 - 00:00:00 CET

Original text of this message