How to Modify 2-Digit to 4-Digit Year Conversion Century Window (244664)



The information in this article applies to:

  • Microsoft Site Server 3.0
  • Microsoft Site Server 3.0 Commerce Edition

This article was previously published under Q244664
This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about how to obtain support for a Beta release, see the documentation that is included with the Beta product files, or check the Web location from which you downloaded the release.
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SUMMARY

In Site Server, there are several four-digit year fields that accept two digits. For example, an administrator can input a two-digit year when setting the group membership expiration on a user. Becuase Site Server stores all dates in four-digit year format, it must choose the century to convert the two-digit year to four digits. While Site Server properly maintains any four-digit date that is entered, this article defines how Site Server 3.0 chooses the century information when users input two-digit dates.

MORE INFORMATION

Many features in Site Server 3.0 use OLE Automation for two-digit to four-digit year conversion. OLE Automation uses the Operating System settings to determine the break point for the 100 year century date window. By default, all Windows operating systems use 30 as the break point between the 20th and 21st centuries. For instance, entering 29 converts to 2029, whereas entering 30 converts to 1930.

You can modify the century window on Windows 2000 and Windows 98 computers through the Control Panel Regional Options by clicking the Date tab, and then choosing Calendar.

On Windows NT systems, you can adjust the century window by modifying the registry.

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.

  1. Start Registry Editor (Regedt32.exe).
  2. Locate the following key in the registry:

    HKEY_CURRENT_USER\Control Panel\International

  3. On the Edit menu, click Add Key, and then add the following registry key:

    Calendars

  4. Under HKEY_CURRENT_USER\Control Panel\International\Calendars add the following registry key:

    TwoDigitYearMax

  5. Under HKEY_CURRENT_USER\Control Panel\International\Calendars\TwoDigitYearMax, on the Edit menu, click Add Value, and then add the following registry value:

    Value Name:1
    Data Type:REG_SZ
    Value:20XX (where XX is the last two digits you want interpreted as 21st century)

  6. Quit Registry Editor.
  7. Restart the computer.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:KB244664