>Any thoughts on how to handle existing code to solve
>the year 2000 problem.
>
>ajay
For VFP3 you can add the following to the valid() event of a text box for dates:
if alltrim(upper(set('CENTURY')))='ON' && Do only if 2 digit years in effect
return 1
endif
if !empty(this.value) && need an input value
if type('this.value')=='C'
this.value=date()
return 1
endif
if !empty(this.epoch) && need an epoch trigger
if substr(str(year(this.value),4),1,2)='19' && may have used calendar control so only if 19xx
if this.value
this.value=this.value+36525 && 100 years of 365 days plus 25 leaps
return 1
endif
endif
endif
endif
epoch is a custom property set to the rollover year (i.e. 1921, 1970 or whatever fits the app)
HTH
Gary
Helping Make Ideas Reality