BUG: Date in Text Box Displays Year with Four DigitsLast reviewed: March 20, 1998Article ID: Q174426 |
The information in this article applies to:
SYMPTOMSIf your system year is 2000 or higher and you display the DATE() in a text box, the year will display with four digits regardless of the SET CENTURY setting. This behavior also appears with @GET commands.
RESOLUTIONTo work around the problem, wrap the DATE() function with DTOC() function. This will correctly display the date in a text box, for example:
Thisform.Text1.Value = DTOC(Date())You may also want to setup a input mask so a user can enter a date in the text box.
Thisform.Text1.Inputmask = '99/99/99'NOTE: This will be a character data type. Therefore, use the CTOD() function before writing the date back to a table and also check the century of the year.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
|
Additional query words: kby2k Year 2000
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |