ACC: How to Display Only the Last Two Digits of Any YearLast reviewed: April 2, 1997Article ID: Q95907 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. This article describes how to display only the last two digits of the year. The expression
=Year(Now())displays all four digits of the current year (for example, 1993). In order to display only the last two digits of the year (for example, 93), use one of the following expressions:
=Format(Now(),"yy") -or- =Right(Str(Year(Now())),2)The breakdown of expression 2 is:
=Year(Now()) Mod 100 REFERENCESFor more information about the first expression, search the Help Index for "formatting dates," or ask the Microsoft Access 97 Office Assistant. For more information about the elements in the second expression, search the Help Index for "year," "right," "str," or "now." |
Keywords : ExrOthr kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |