How to Configure the Short Date Format in Windows and Windows NT

ID: Q241671


The information in this article applies to:
  • Microsoft Windows NT Server version 4.0
  • Microsoft Windows NT Workstation version 4.0
  • Microsoft Windows 98
  • Microsoft Windows 95

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SUMMARY

This article describes how to configure the short date format that is displayed in Windows and Windows NT.


MORE INFORMATION

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.

For information about a hoax e-mail message regarding the short date format, please click the link below to visit the Microsoft Web site:

http://www.microsoft.com/y2k/hoax/y2khoax.htm
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:
  1. Log on using the user account you want to configure.


  2. Click Start, point to Settings, click Control Panel, and then double-click Regional Settings.


  3. On the Date tab, click the date format you want to use in the Short date style box, and then click OK.


  4. 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: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

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:
  1. In Registry Editor, open the following key:


  2. HKEY_USERS\.Default\Control Panel\International
  3. Add or edit the sShortDate string value using a value data for the short date format contained in the following list:


    • MM/dd/yyyy
    • M/d/yy
    • M/d/yyyy
    • MM/dd/yy
    • yy/MM/dd
    • yyyy-MM-dd
    • dd-MMM-yy

  4. Quit Registry Editor.


  5. 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:
Q159936 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:
http://www.microsoft.com/ntserver/management/deployment/planguide/prof_policies.asp

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:
  1. Click Start, click Run, type notepad, and then click OK.


  2. 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.


  3. 
    ; 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. 
  4. 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 the 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 executable file that contains Poledit.exe, from online services. Download this file from the following Web site:
http://www.microsoft.com/office/ork/appa/appa.htm#dex4
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:
  1. In System Policy Editor, click Policy Templates on the Options menu.


  2. Click Add, open the folder that contains the Shrtdate.adm file, click the Shrtdate.adm file, and then click Open.


  3. Click OK.


  4. 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.


  5. Double-click Default User, and then double-click Short Date Format Settings.


  6. Click to select the Date Format for all Users check box.


  7. In the Date Format box, click the short date format that you want to use, and then click OK.


  8. 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:
Q216661 How to Implement a Policy to Set the Date Format
For more information about how Microsoft products are affected by year 2000 (Y2K) issues, please see the following Microsoft World Wide Web site:
http://www.microsoft.com/year2000/

Additional query words: y2k

Keywords : kbenv kbnetwork kbtool kb2000 win95 win98
Version : WINDOWS:95; winnt:4.0
Platform : WINDOWS winnt
Issue type : kbinfo


Last Reviewed: December 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.