How can I change the short date format from yy to yyyy?

A. Due to Year 2000 concerns you may want the NT short date format to show 4 digit years as opposed to the short 2 digit version. The normal method is as follows:

  1. Start the Regional Control Panel Applet (Start - Settings - Control Panel - Regional)
  2. Select the Date tab
  3. Select 'M/d/yyyy' and click Apply
  4. Click OK
  5. Close the dialog

All this actually does is set the registry entry HKEY_CURRENT_USER\Control Panel\International\sShortDate and so you can use this to automate the update. For example using the REG.EXE utility, e.g.

C:\> reg update "HKCU\Control Panel\International\sShortDate=M/d/yyyy"

This could be incorporated in a login script or even a custom system policy.

You will also notice under the registry key the long date format can be set by changing sLongDate.

An alternate solution to set for new systems is by using an unattended installation, make the sShortDate change as part of the CMDLINES.TXT setup. This is then adopted by admin and any new accounts created on the workstation. Sample code:

***** CMDLINES.TXT *****
"rundll32 setupapi InstallHinfSection DefaultInstall 128 .\y2k.inf"
***** EOF ********

*** y2k.inf ***
\[Version\]
Signature="$Windows NT$"

\[DefaultInstall\]
AddReg=AddReg

\[AddReg\]
HKU,".DEFAULT\Control Panel\International","sShortDate",,"M/d/yyyy"
*** EOF ***


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish