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

ID: Q188707


The information in this article applies to:
  • Microsoft Visual C++, 32-bit Editions, versions 4.2, 5.0, 6.0


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) 


REFERENCES

You can find more information about the Year 2000 problem and date format life expectancies in the Microsoft Developer Network article "Get Ready for the Year 2000" by Nancy Winnick Cluts.

For more information about how Microsoft products are affected by year 2000 (Y2K) issues, please see the following Microsoft World Wide Web site:

http://www.microsoft.com/y2k/

Additional query words: Y2K DATE struct tm FILETIME SYSTEMTIME SQL_TIMESTAMP_STRUCT SQL_DATE_STRUCT

Keywords : kb2000 kbCRT kbMFC kbVC500
Version : winnt:4.2,5.0,6.0
Platform : winnt
Issue type : kbinfo


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