>> I'm still using Delphi 3.02 at moment, and notice that StrToDate funtion
>> does not treat 2 digit year nicely. e.g StrToDate('01/01/01') returns
>> 01/01/1901, not 01/01/2001 which should be the one many people want.
>How is Delphi supposed to know that? It is merely following the convention
>of the day (omitting the digits of the current century). If you want 2001
>then put 20 in front of the year and feed that into StrToDate !
>I would rather have any day a scheme where I can tell Delphi exactly the
>date I want than to have it guess and get it wrong.
<IMHO>
I disagree... The sliding window has been a popular method advocated for some
time as an important dataentry tool. Many sources of information have 2 digit
year dates printed and rapid dataentry essentially means acting as a photocopier
not an interpreter. If you ask many data-entry specialists what they just typed,
they won't have a clue but it will be flawless and fast. 2 digit dates ease the
burden of reinterpretation and the sliding window is the closest algorithmic
approximation of what a person does when reading a 2 digit date.
</IMHO>
As far as how does Delphi4 deal with the issue. There are global variables to
enable the sliding window for 2 digit year calculation to enable post 2k dates
to be interpreted as post 2k rather than pre 2k.
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz