INFO: Visual C++ and the Year 2000, Years that Cause an Overflow (188707)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 4.2
  • Microsoft Visual C++, 32-bit Enterprise Edition 5.0
  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 4.2
  • Microsoft Visual C++, 32-bit Professional Edition 5.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0

This article was previously published under Q188707

SUMMARY

To determine whether applications developed with Visual C++ will encounter problems in the year 2000, you must consider the following three items:
  1. Display format and user input of dates.
  2. Temporary storage in the program. This includes variables and function parameters.
  3. Long-term storage such as a database or file.
Visual C++ is a flexible development tool. You can create your own date formats for display, input, and storage. This article can only comment on the APIs and data types supplied with the various technologies shipping with Visual C++. You should analyze your application for potential year 2000 problems in all other aspects of your programming.

MORE INFORMATION

Following are the years that will cause an overflow in the date for each given technology. For the database APIs, please be aware that database drivers may reformat the date types to meet the needs of the target database. You must check the format of date types for your target databases.
   YEAR    Technology
   ----    ----------
   2038    C Run-time (CRT) time functions and data types
   2038    MFC CTime
   9999    MFC COleDateTime
   9999    ADO, RDO, DAO
   16383   ODBC
   2099    Win32 time functions and data types
   2108    Win32 file time functions and data types
   9999    OLE data types (such as: VARIANT, DATE)
				

Modification Type:MajorLast Reviewed:12/2/2003
Keywords:kbCRT kbDateTime kbinfo KB188707