WD: Find File Fails with Dates Beyond Year 2000ID: Q171286
|
When you try to perform a search for a document in Microsoft Word 2.x or 6.x for Windows using the Find File feature, the search fails if you search for dates later than December 31, 2000.
By default, Word 2.x and 6.x only use the last two digits of the year when using the Find File feature; therefore, when you enter a year of 2006, Word searches for the year 1906 rather than 2006.
NOTE: This is only a limitation of the default date format that is used in the Find File feature. Internally, Word 2.x and 6.x use a four-digit representation of the year. Note also that the file searching feature of Microsoft Word for Windows 95, version 7.x, and Word 97 use all four digits of the year.
To work around this problem, you can use one of the following methods.
Setting Result
------------------------------------------------------------
DATEFORMAT=MM/dd/yyyy 01/02/1994
DATEFORMAT=MMMM d, yyyy January 2, 1994
DATEFORMAT=MMMM dd, yyyy January 02, 1994
DATEFORMAT=dddd, MMMM d, yyyy Sunday, January 2, 1994
Setting Result
------------------------------------------------------------
DATEFORMAT=MM/dd/yyyy 01/02/1994
DATEFORMAT=MMMM d, yyyy January 2, 1994
DATEFORMAT=MMMM dd, yyyy January 02, 1994
DATEFORMAT=dddd, MMMM d, yyyy Sunday, January 2, 1994
You can use any Date-Time Picture switch format for this setting. To
display all the available Date-Time Picture switch formats, follow these steps:
The DATEFORMAT setting in the Winword6.ini or the Win.ini file influences several different areas of Word. Each of the following areas correctly represents the year using a four-digit format if DATEFORMAT is set accordingly.
File Date:
By default, in Word , the file date uses the date format order set
specified in the Windows Regional Settings (Control Panel). This date format
is MM/dd/yy for the United States, dd/MM/yy for Europe, and yy/MM/dd for
Japan. Therefore, a date of January 1, 2006, is represented the same way
as January 1, 1906. That is, both dates are represented in the form "1/1/06."
Saved or Creation Date:
Unless you have changed the default year format in the Winword6.ini or the Win.ini file, the Find
File feature uses only the last two digits of the Saved Date or the Creation
Date when performing a search. The valid date range for Find File is
01/01/1901 (01/01/01) to 12/31/2000 (12/31/00).
Summary Information:
By default, the Summary Information that is displayed when you click the
File menu, click Summary Info, and click Statistics, displays only a two-digit representation of the year.
Related Date Fields:
Date-related fields, such as CreateDate, Date, PrintDate, SaveDate, and
Time, correctly display a four-digit year if you choose a four-digit
date format option such as "MMMM d, yyyy" (four y characters signify a
four-digit year, while two y characters signify a two-digit year).
In WordBasic, date-related commands have the following range of recognized
dates.
Command Limitation
-----------------------------------------------------------------------
Date$() Valid for 12/30/1899 to 12/31/4095. This command will
return a date with a two-digit year if it is formatted
to do so. Otherwise it will return a four-digit year.
DateSerial() Valid for 12/30/1899 to 12/31/4095. To specify dates
after the year 1999, you must use all four digits of the
year.
DateValue() Valid for 12/30/1899 to 12/31/4095. To specify dates
after the year 1999, you must use all four digits of the
year.
Day() Valid for 12/30/1899 to 12/31/4095.
Days360 Valid for 12/30/1899 to 12/31/4095.
For more information, please see the following articles
in the Microsoft Knowledge Base:
Q110995 WD6X: How to Set a Default DATE Field Format in Word 6.0
Q85557 File Manager Shows Garbled Date for Year 2000 or Later
http://www.microsoft.com/year2000/
Additional query words: year 2000 y2k
Keywords : kbinterop kbdta kb2000
Version : WINDOWS:2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c,6.0,6.0a,6.0c
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 2, 1999