Access 2k Year/Date Problem

R

Roy

When attempting to enter a date containing a future year into an
Access 2k date field, Access changes the year to the current year.
For example, in Dec of 2003 whenever I would attempt to enter a date
containing the year 2004, such as January 1, 2004, it was changed to
January 1, 2003 by Access. The field is a Date/Time Data Type and the
Format is mmm yy and the Input Mask is LLL-00. Is there anything I
can do to permit the entry of years beyond the current year into this
Access database? Thanks
 
V

Van T. Dinh

The problem is your InputMask. It is most likely that Access interprets
your input as MMM-dd and since there is no year entry, Access assumes the
year to be current year!

Note that if your Field is a DateTime Field (which stores a POINT in
date/time), you need to specify the day component, NOT just month & year.
 
J

John Vinson

When attempting to enter a date containing a future year into an
Access 2k date field, Access changes the year to the current year.

Only if you don't type the year.
For example, in Dec of 2003 whenever I would attempt to enter a date
containing the year 2004, such as January 1, 2004, it was changed to
January 1, 2003 by Access. The field is a Date/Time Data Type and the
Format is mmm yy and the Input Mask is LLL-00. Is there anything I
can do to permit the entry of years beyond the current year into this
Access database? Thanks

Enter both the day and the year. A Date/Time value is always a
specific day; regardless of the format or the input mask, it will
always be a specific day. If you enter Jan 01 or Jan 28 it will assume
that the numeric portion is the day, not the year. If you don't care
what day it is, either use a Text field (which will cause sorting
problems) or - either manually or programatically - enter a complete
date.
 

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