Dates pre 1920

C

Cheekie975

Hi All. I'm new to this site. I have created a database in Access to keep
client's details on including dates of birth. However, it won't let me enter
a date pre 1920, it wants to convert it to 2020. Any ideas anyone?

Many thanks!
 
D

Dirk Goldgar

Cheekie975 said:
Hi All. I'm new to this site. I have created a database in Access to keep
client's details on including dates of birth. However, it won't let me
enter
a date pre 1920, it wants to convert it to 2020. Any ideas anyone?


How are you entering the date? Have you tried typing in the whole year?

The Date/Time data type can hold dates all the way back to the year 100 CE,
so its not a problem with the field itself. But if you enter a 2-digit
year, Access has to apply a rule to decide what century it's in. I believe
(without checking) that the rule comes from your system settings.
 
K

Klatuu

This is the rule Dirk was talking about:

A program that uses this option to interpret two-digit years will consider
the years between (and including) 30 and 99 to be preceded by 19, and years
between (and including) 00 and 29 to be preceded by 20. For example, 99 will
be interpreted as 1999 and 01 will be interpreted as 2001.

It can be modified, but the best practice is to use 4 digit years.
 
F

fredg

Hi All. I'm new to this site. I have created a database in Access to keep
client's details on including dates of birth. However, it won't let me enter
a date pre 1920, it wants to convert it to 2020. Any ideas anyone?

Many thanks!

I would suspect that you are trying to enter the year as a 2 digit
year, i.e. 12/15/20 (for 12/15/1920) and Access is interpreting that
as 12/15/2020. Than is correct. Access has to guess the century and,
since the Year 2000 Update, Access will guess that any 2 digit year
entered between 30 and 99 represents the years 1930 to 1999. Any 2
digit year entry of 00 thru 29 represents the years 2000-2029.
The solution is to not make Access guess. Enter the year as a 4 digit
year (12/15/1920) and your problem goes away.
 
C

Cheekie975

I am entering it as a 4 digit year, but it converts it back to 2020. I'm so
confused!
 
J

John W. Vinson

I am entering it as a 4 digit year, but it converts it back to 2020. I'm so
confused!

Do you have an Input Mask on the field, or on your form control? Is there any
VBA code or validation rule on either? What keystrokes are you actually
typing?
 
D

Dirk Goldgar

Cheekie975 said:
I am entering it as a 4 digit year, but it converts it back to 2020. I'm so
confused!


That's peculiar. What *exactly* are you typing in? Is there an input mask?
Are you entering this on a form or in a table datasheet? What is the data
type of the field in the table?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top