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

ID: Q191807


The information in this article applies to:
  • Microsoft SQL Server version 6.5

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 version 6.5. This problem has been corrected in U.S. Service Pack 5a for Microsoft SQL Server version 6.5. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

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.


Additional query words: prodsqlsp sp5get current year SEM SSEM ent man entman

Keywords : SSrvTran_SQL kbbug6.50 kbfix6.50.SP5
Version : winnt:6.5
Platform : winnt
Issue type : kbbug


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