Prodata Year 2000 Patch

 

I've tested Prodata (PC v1.23) for year 2000 issues and have concluded that:

1. All date calculations work correctly, including the datenum, sdate and ldate functions, for years >= 2000.
For example if you have a calculation which takes today's date and adds a year, then displays it as a string, it will display "24 March 2000"
Try this. Define a variable as follows and add this variable to a layout:

nextyear = ldate(datenum(sys_date) + 366)


2. The bug. After 1/1/2000 the sys_date and sys_sdate system variables and also the ALT-D macro display the date incorrectly, i.e. "01 January 19:0" and "01/01/19:0".

To fix the ALT-D macro, create a file PRODATA.KEY (or edit the existing PRODATA.KEY file) in the PRODATA directory. Add the line (exactly as shown):

KEY 300 "^788^^754^^639^^639^^630^200^755^


To fix the sys_date and sys_sdate variables (and sys_ldate which is the same as sys_date) add the following variables (this will be needed in any database using these system variables in expressions):

sys_date = sys_date[1:-5] + "200" + sys_date[-1]
sys_sdate = sys_sdate[1:-3] + "200" + sys_sdate[-1]
sys_ldate = sys_ldate[1:-5] + "200" + sys_ldate[-1]


Important Note: these fixes should not be installed until 1/1/2000 and will work until 31/12/2009.

To fix for subsequent decades, just change the "200" in the above to "201", "202" etc.
Please let me know of any problems with this.


Mark Tilley
Prodata author
24 March 1999


Protext Home Page