From: "Bill Todd \(TeamB\)" Subject: Re: Problem with TwoDigitYearCenturyWindow Date: 09 Dec 1999 00:00:00 GMT Message-ID: <82pp85$jaj16@forums.borland.com> References: <38502208.D684ECBA@amsoft.de> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Reply-To: "Bill Todd \(TeamB\)" Newsgroups: borland.public.delphi.database.desktop TwoDigitYearCenturyWindow has nothing to do with how the data in a table is displayed. What it controls is what happens when the user enters 11/15/48 in a DBEdit. Delphi has to convert this string to a TDateTime before it can be stored in the database. Since all modern database store the full four digit year this means that Delphi has to guess whether 48 should be stored as 1948, 2048, 1848 etc. The default value for TwoDigitYearCenturyWindow is zero which means that the current century will be assumed. In the example above your would get 1948. If you set TwoDigitYearCenturyWindow to some value then the century is determined by subtracting that value from the current two digit year. For example, if you set it to 50 then Delphi takes 99 - 50 = 49. If the two digit year it is converting is less then 49 it assumes the next century. If the year is >= 49 it assumes the current century. So, given the example year of 48 you will get 2048. -- Bill Bill Todd (TeamB) (TeamB cannot respond to questions received via email)