ACC: Date/Time Data Type Provides Current Year Automatically

ID: Q98802


The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97


SUMMARY

Novice: Requires knowledge of the user interface on single-user computers.

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>


Additional query words: misc date/time

Keywords : TblOthr
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: March 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.