Short date format uses two-digit year instead of four-digit year in Windows NT 4.0

Article translations Article translations
Article ID: 242257 - View products that this article applies to.
This article was previously published under Q242257
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all


If you configure a Windows NT 4.0 service that can run with no current user logged onto the computer, the number of digits used to display the year is not affected by the user profiles.


This issue occurs because when there is not a user logged on to the computer, the number of digits used to display the year are contained in the Locale.nls binary file, which also contains fixed values for such formats in all localized versions of Windows NT 4.0. The file is the same in all localized versions of Windows NT 4.0.


A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:;EN-US;CNTACTMS
NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English-language version of this fix should have the following file attributes or later:
   Date      Time      Size      File name    Platform
   9/22/99   12:25pm   146,832   locale.nls   x86
Note This hotfix requires the Hfx.exe program to install. This program is not included with the hotfix.


Microsoft has confirmed that this is a problem in Windows NT 4.0.


When a program uses the GetLocaleInfo function to retrieve date information, the function uses the short date format. You can configure each user profile to use either two or four digits to display the year in the short date format.

In C++, a common way to change a variant date value into a BStr data type is to use the ::VariantChangeType function. This function calls the GetLocaleInfo function and therefore uses the short date format.

Also, most date conversion code written in Microsoft Visual Basic calls the GetLocaleInfo function.

The problem usually only applies to a "displayed date", and your Visual Basic program uses the real date independently from what is displayed. However, this can be a real problem for every middle tier program that might return a date value. For example, an XML string that sends a result to a Web browser client or a client side Javascript string that runs and interprets a two-digit year its own way.

Client-side programs could depend on client-side user profiles for their interpretation of a two-digit year.

Microsoft recommends that you configure server programs that are running in the middle tier and return information to a client as text, use a four-digit year for all dates whenever you call the GetLocaleInfo function.


Article ID: 242257 - Last Review: October 22, 2013 - Revision: 3.3
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix KB242257

Give Feedback


Contact us for more help

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