Mega Code Archive

 
Categories / Delphi / ADO Database
 

Dates with single digit years operate differently with a leading zero

Question: If I have a Paradox alpha field in which I restruture it and change the field to a date or datetime field, how come 1/1/1 results in 1/1/0001 whereas the date 1/1/01 results in the date 1/1/2001? Answer: The BDE treats 2 digit years specially. 2 digits years of 50-99 are in 20th Century (1900's). 2 digits years of 0-49 are are in the 21st Century (2000's).