MORE INFORMATION
General Information
Word has the ability to parse simple text as a date. To parse text as a date, Word must know the order of day, month, and year. To determine this order, Word first looks at the short date format setting in the
Regional Settings (on
Control Panel). The exception to this is if Word is parsing the date by using the
Sort command on the
Table menu.
Word checks to see whether each element of the date falls within the possible values for day, month, and year. If one or more of the elements does not fall within the possible range of values for day, month, and year, Word looks at the installed language for date orderings and tries these next.
The following table shows the date orderings for the languages supported by Word. If the installed language is not shown here, Word uses the default date ordering.
Language Date Order
-------------------------------------------------------------------
Danish, German, Italian, DMY, YMD, MDY
and Portuguese (Brazil)
English, Chinese, Czechoslovakian, MDY, DMY, YMD
Dutch, Finnish, French, Hungarian,
Norwegian, Polish, Russian,
Slovakian, Spanish, and Turkish
Greek, Slovenian, and Swedish DMY, MDY, YMD
Japanese MDY, DMY, MMD, TMD, SMD, HMD, YMD
Korean and Taiwanese MDY, DMY, MMD, TMD, SMD, YMD
You can check the Windows registry to determine the installed language. This information is stored in the following registry keys:
HKEY_Current_User\Software\Microsoft\Office\9.0\Common\LanguageResources\InstallLanguage
HKEY_Current_User\Software\Microsoft\Office\9.0\Common\LanguageResources\InstallFlavor
Date Parsing During a Sort
When parsing dates during a sort, Word uses the
Sorting Language setting in the
Sort Options dialog box. The default language setting is determined by the language of the text at the beginning of the current selection.
Word uses the same date orderings described in the previous table. But, when using the Sort feature, Word does not look at the settings in the
Regional Settings Control Panel.
If Word encounters an invalid date during a sort, it places the invalid dates at the end of the list if you are sorting in descending order or at the beginning of the list if you are sorting in ascending order.
Sliding Date Window
Word uses a sliding 100-year window to determine the century when interpreting a two-digit year. By default, this window is set to 1930-2029. This means that two-digit years 00-29 are interpreted as 2000-2029, and two-digit years 30-99 are interpreted as 1930-1999.
Changing the Sliding Date
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may
require you to reinstall your operating system. Microsoft cannot guarantee that you can solve
problems that result from using Registry Editor incorrectly. Use Registry Editor at your own
risk.
In Windows 98 and Windows 2000, you can change this sliding window on the
Date tab in the
Regional Settings Control Panel. This setting is reflected in the Windows registry under the following registry key:
HKEY_Current_User\Control Panel\International\Calendars\TwoDigitYearMax\1
This is a system-wide setting. Changing it affects all applications that call this API.