TIP: Click on subject to list as thread! ANSI
echo: foxpro
to: GERRY DANEN
from: GILLES BEAUREGARD
date: 1996-12-28 22:34:00
subject: YEAR 2000 BUG FIX

 Allo!
 I just finish that small util, so you can use it, if your
 customer, need to continue to use a 2 digits field for
 date entry.
 No need to turn CENTURY ON
 Hope that one will be usefull.
*
*   96/12/28             ASSUME.PRG
*      Author's Name : Gilles Beauregard
*  Copyright (c) 1996: Gilles Beauregard
*             Address: 12 Sunnyside
*                City: Pointe-Claire, QC, H9S 5G5
*              e-mail: gilles@biwi.qc.ca
*                http://www.biwi.qc.ca
*                Fido: 1:167/722
*    Description: This small util will cure the Gilles
*    Beauregard YEAR 2000 BUG, also know as:
*     "YEAR 2000 BUG was more than a 4 digits problem"
* You must run this util just after
* you have enter the 2 digits date.
PARAMETER a
* "a" is the parameter for the date
* As you know, Foxpro assume 1900 when you enter 00
* in a 2 digits field, so we will test if the date
* is far from 2000.
IF a - date() < 15000
* You can use a different numbers, but 15,000
* was good until 1961. If you need a bigger range,
* you can use a different one.
* If .T. return, we add 36525 days, 100 years to
* the date to have the next century date.
a = a + 36525
ENDIF
* Now we have another test to do when we reach the
* Year 2000, and we want to enter back dated material.
* As you know, Foxpro assume 2096 when you enter 96
* in a 2 digits field, and we are in 2000 or later.
* So we will test if the date is far from 2000.
IF a - date() > 15000
* You can use a different numbers, but 15,000 was good
* until 2044. If you need a bigger range, you can use
* a different one.
a = a - 36525
* If .T. return, we remove 36525 days, 100 years to the
* date to have the previous century date.
ENDIF
* Hope this will cure, until it's was hard code into
* the source code of database package.
* This util, is provide free of charge to all of you,
* providing new free version of your application.
--- Maximus 3.01
---------------
* Origin: 2000-=>FIDO WHQ 'YEAR 2000 BUG' (514) 694-0703 (1:167/722)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.