The information in this article applies to:
SUMMARYThis article describes two methods that you can use on a field formatted with the Date data type so that dates can be entered in a year later than 1999. MORE INFORMATION
Unless you explicitly enter the year in a date field as 2000 or later,
Microsoft Access saves the year portion as 1900 - 1999 as appropriate.
For example, if a field has the Date/Time data type, and you type the
date as 01/01/00, Microsoft Access saves the year portion internally
as 1900. If you enter the date as 01/01/2000, Microsoft Access saves the
year portion internally as 2000. However, the date still appears in the
date field as 01/01/00 if displayed using the Short Date format
Method 1Method 1 adds a procedure to the field's AfterUpdate event that checks the year, and if the year is less than 1930 (that is, the last two digits are 00 through 29), it adds 100 years to the date. To use this method, follow these steps:
Method 2Method 2 uses the expression below in the Update To line in an update query. You can use this method if you have a table that already contains dates that you want to convert to the year 2000 and later. The expression assumes that the name of the field you want to update is myDateField. Substitute the name of the field in your table for the myDateField field in the expression below.NOTE: In the following expression, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this expression.
REFERENCESFor more information about how Microsoft products are affected by year 2000 (Y2K) issues, please see the following Microsoft World Wide Web site: http://www.microsoft.com/y2k/ Additional query words: Y2K Year 2000 millennium two-thousand two thousand
Keywords : kbusage kb2000 TblFldp |
Last Reviewed: April 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |