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

Article translations Article translations
Article ID: 241671 - View products that this article applies to.
This article was previously published under Q241671
Expand all | Collapse all

On This Page

SUMMARY

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

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

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

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:
    HKEY_USERS\.Default\Control Panel\International
  2. 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

  3. Quit Registry Editor.
  4. 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:
http://technet.microsoft.com/en-us/library/cc750987.aspx

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.
    ; 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.
    					
  3. 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:
http://technet.microsoft.com/en-us/library/cc751042.aspx
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:
216661 How to Implement a Policy to Set the Date Format

Properties

Article ID: 241671 - Last Review: April 9, 2012 - Revision: 2.0
APPLIES TO
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows 95
Keywords: 
kbenv kbinfo kbnetwork KB241671

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com