Microsoft KB Archive/241671
Article ID: 241671
Article Last Modified on 8/13/2007
- Microsoft Windows NT Server 4.0 Standard Edition
- Microsoft Windows NT Workstation 4.0 Developer Edition
- Microsoft Windows 98 Standard Edition
- Microsoft Windows 95
This article was previously published under Q241671
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
This article describes how to configure the short date format that is displayed in Windows and Windows NT.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
248142 Default System Date Behavior in Windows NT 4.0 and Windows 2000
In Windows and Windows NT, the short date format is the date format that is displayed to the user. Some third-party programs may also use the short date format to determine the date. Because the short date format contains only two digits for the year by default, third-party programs that use the short date format may misinterpret dates after the year 1999 as years in the 1900s.
NOTE: In Windows and Windows NT, the short date format is a display setting only. Windows and Windows NT do not use the short date format to determine the current date. Also, user profiles need to be used on the client Windows 98/95 computers for this profile to take effect.
In an attempt to avoid possible issues that may occur using third-party programs that use the short date format, you can configure the short date format to use a 4-digit year instead of a 2-digit year by using one of the following methods:
Change the Short Date Format for a User
You can change the short date format for a specific user using the Regional Settings tool in Control Panel:
- Log on using the user account you want to configure.
- Click Start, point to Settings, click Control Panel, and then double-click Regional Settings.
- On the Date tab, click the date format you want to use in the Short date style box, and then click OK.
- Log off Windows, and then log on to Windows again to save the setting.
Change the Short Date Format for All Users in 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.
NOTE: This method does not work in Windows NT 4.0.
You can edit the regitry to change the short date format for all the user accounts on the computer:
- In Registry Editor, open the following key:
- Add or edit the sShortDate string value using a value data for the short date format contained in the following list:
- Quit Registry Editor.
- Log off Windows, and then log on to Windows again to save the setting.
Change the Short Date Format for All Users Using a System Policy
To configure the short date format using a system policy, create a custom .adm template file, and then set a system policy using System Policy Editor (Poledit.exe) to configure the short date format.
For additional information about creating and using system policies, click the article number below to view the article in the Microsoft Knowledge Base:
159936 Using the Windows NT 4.0 or Windows 95 System Policy Editor
NOTE: Administrators can use a system policy file for greater control in configuring the short date format on a network.
For information about how to implement profiles and policies in Windows NT, please click the link below to visit the Microsoft Web site:
Create a Custom ADM Template File
To create a custom .adm template file that you can use to configure the short date format, follow these steps:
- Click Start, click Run, type notepad, and then click OK.
Type the following lines into the untitled file pressing ENTER after each line. You can also use copy and paste commands to place the text into the untitled file.
; Begin custom .ADM template ; This policy file modifies the short date format for all users. CLASS USER CATEGORY !!DFORMAT KEYNAME "Control Panel\International" POLICY !!DefineDateFormat PART !!DateFormat DROPDOWNLIST VALUENAME sShortDate REQUIRED ITEMLIST NAME !!ShortDate1 VALUE !!ShortDate1 ACTIONLIST VALUENAME sShortDate VALUE "MM/dd/yyyy" END ACTIONLIST NAME !!ShortDate2 VALUE !!ShortDate2 ACTIONLIST VALUENAME sShortDate VALUE "M/d/yy" END ACTIONLIST NAME !!ShortDate3 VALUE !!ShortDate3 ACTIONLIST VALUENAME sShortDate VALUE "M/d/yyyy" END ACTIONLIST NAME !!ShortDate4 VALUE !!ShortDate4 ACTIONLIST VALUENAME sShortDate VALUE "MM/dd/yy" END ACTIONLIST NAME !!ShortDate5 VALUE !!ShortDate5 ACTIONLIST VALUENAME sShortDate VALUE "yy/MM/dd" END ACTIONLIST NAME !!ShortDate6 VALUE !!ShortDate6 ACTIONLIST VALUENAME sShortDate VALUE "yyyy-MM-dd" END ACTIONLIST NAME !!ShortDate7 VALUE !!ShortDate7 ACTIONLIST VALUENAME sShortDate VALUE "dd-MMM-yy" END ACTIONLIST END ITEMLIST END PART END POLICY END CATEGORY [Strings] DFORMAT = "Short Date Format Settings" DefineDateFormat = "Date Format for All Users" DateFormat = "Date Format" ShortDate1 = "MM/dd/yyyy" ShortDate2 = "M/d/yy" ShortDate3 = "M/d/yyyy" ShortDate4 = "MM/dd/yy" ShortDate5 = "yy/MM/dd" ShortDate6 = "yyyy-MM-dd" ShortDate7 = "dd-MMM-yy" ; End custom .ADM template.
- On the File menu, click Save As, type shrtdate.adm, and then click Save.
Create or Modify System Policy File
You can edit the registry by using System Policy Editor (Poledit.exe) or Registry Editor (Regedit.exe). Check with your network administrator before you make any changes to the registry. System Policy Editor (Poledit.exe) is available in the Admin\Apptools\Poledit folder on the Windows 95 compact disc. Use the Add/Remove Programs tool in Control Panel to install System Policy Editor.
NOTE: If you are using the Microsoft Office 97 system policy templates that are included in the Microsoft Office 97 Resource Kit, you must use the version of System Policy Editor that is included in the Microsoft Office 97 Resource Kit or the Microsoft Windows NT 4.0 Resource Kit.
You can download Policy.exe, a self-extracting file that contains Poledit.exe, from online services. Download this file from the following Microsoft Web site:
Use the following steps to edit the registry with System Policy Editor:
To create or modify your system policy file using the new Shrtdate.adm template file, follow these steps:
- In System Policy Editor, click Policy Templates on the Options menu.
- Click Add, open the folder that contains the Shrtdate.adm file, click the Shrtdate.adm file, and then click Open.
- Click OK.
- On the File menu, click Open Policy to open an existing system policy file or click New Policy to create a new system policy file.
- Double-click Default User, and then double-click Short Date Format Settings.
- Click to select the Date Format for all Users check box.
- In the Date Format box, click the short date format that you want to use, and then click OK.
- Save the system policy file, and then quit System Policy Editor.
For additional information about how to use a policy to set the date format, click the article number below to view the article in the Microsoft Knowledge Base:
216661 How to Implement a Policy to Set the Date Format
Additional query words: y2k
Keywords: kbenv kbinfo kbnetwork KB241671