Re: Year 2000 problem/easy

From: nix <nix_at_gate.net>
Date: 1996/01/02
Message-ID: <30E9EF90.21BB_at_gate.net>#1/1


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 Received on Tue Jan 02 1996 - 00:00:00 CET

Original text of this message