ACC: Date/Time Data Type Provides Current Year Automatically

Last reviewed: April 2, 1997
Article 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.

Steps to Reproduce Behavior

  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 : kbusage TblOthr
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.