> ----------
> From:         Terry Johnson[SMTP:[EMAIL PROTECTED]]
> Sent:         Tuesday, January 19, 1999 4:03:45 PM
> To:   Multiple recipients of list delphi
> Subject:      RE: [DUG]:  Y2k issue
> Auto forwarded by a Rule
> 
Paul,

>Yup. The root problem is in the Delphi 2 and 3 StrToDate routines which
TDateTimeField calls and their handling of 2 digit years. Real brain-dead
stuff, even in Delphi 4 they still throw 'bad date' exceptions at the drop
off a hat. (Don't get me started - it's a pet peeve).<

My solution was to use my own StrToDate function based on theirs. If the
full century is specified (e.g. '1/10/1999'), then you know that the string
'1999' must appear in the original string, and if it doesn't, you know you
have to figure out the century yourself. To handle it this way seems ok, to
do anything else that will handle international formats seems like too much
work.

It surprised me that even D3 didn't have this date stuff figured out. Maybe
it was a deliberate move to encourage upgrades ...

Terry
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to