FIX: GETDATE() Returns Wrong Value When System Time Year >= 2038 (191807)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q191807
BUG #: 17946, 18159, 18189 (SQLBUG_65)

SYMPTOMS

When the system time has a date greater than or equal to January 1, 2038 (1/1/2038), the Transact-SQL function GETDATE() returns the wrong result.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.

MORE INFORMATION

The SQL Server Enterprise Manager Create Database interface uses the GETDATE() function to obtain the database creation date and is therefore subject to this bug.

If you are trying to reproduce this problem, exercise caution, because the following possible repercussions may result:
  • Applications that delete records or files based on a certain date may perform an unwanted deletion.
  • Some applications, such as leased applications, may stop running if they are programmed to expire on a certain date.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB191807