ACC: Date/Time Data Type Provides Current Year Automatically (98802)



The information in this article applies to:

  • Microsoft Access 1.0
  • Microsoft Access 1.1
  • Microsoft Access 2.0
  • Microsoft Access for Windows 95 7.0
  • Microsoft Access 97

This article was previously published under Q98802
Novice: Requires knowledge of the user interface on single-user computers.

SUMMARY

If you enter a partial date in a field formatted with the Date/Time data type, Microsoft Access fills in the current year automatically.

MORE INFORMATION

If your data is formatted with the Date/Time data type and you want to indicate the current year, it is not necessary to type the year. This feature works for both tables and forms.

To illustrated this behavior, follow these steps:
  1. Create a new table, as follows:
          Table: DateTable
          --------------------------------
          Field Name: My Date [primary key]
          Data Type: Date/Time
    						
  2. On the View menu, click Datasheet.
  3. Type 1/1, and then press TAB to leave the field. Note that the value you entered is displayed as 1/1/<current year>

Modification Type:MajorLast Reviewed:2/23/2004
Keywords:kbinfo KB98802