Microsoft Y2K  
Microsoft
 This static CD-based web site is representative of the www.microsoft.com/y2k site as of October 15, 1999.

Microsoft Year 2000 Readiness Disclosure & Resource Center
Visual FoxPro 6.0  (German) - 32-Bit Win

Product Summary
Product: Visual FoxPro
Version: 6.0
Category: Compliant*
Operating System: 32-Bit Win
Language: German Release Date: 01 Jan 1998
Operational Range: -
Can applications be built with this tool that adhere to the Microsoft Year 2000 Compliance Statement? Yes
Prerequisites: Visual Studio 6.0 Service Pack 3
Product Dependencies: Windows 95, Windows 98, Windows NT 4.0 Service Pack 4, SQL Server 6.5 Service Pack 5, MDAC 2.0 or greater
Clock Dependencies: System Clock, (OLE) Automation Libraries
Last Updated: 23 Aug 1999
Product Details

This report applies to:

Professional edition.

Operational Range for Data: When using strict date formats, {^0001-01-01}, January 1st, 1 A.D. to {^9999-12-31}, December 31st, 9999 A.D.

Can applications be built with this tool that adhere to the Microsoft Year 2000 Compliance Statement?

Yes, if during design time 4-digit years are specified in date constants, and at run time one of the following actions is taken:

  • 4-digit years are used for data entry.
  • Set Century To Rollover is used to specify the year equal to and above which a 2-digit year is in the 1900s and below which a 2-digit year is in the 2000s.

How the product runtime handles dates:

Dates in variables and calculations are represented as 8-byte numeric values representing the number of days since some fixed date. In tables, date types use 8 bytes per field per record on disk and are stored internally as numeric values. This size is not affected by the settings of SET CENTURY or input masks on textboxes for data entry. This provides for full, unambiguous dates being stored independent of application logic.

Clock Dependencies

The system clock is used to determine DATE(), TIME(), SECONDS() and DATETIME(). YEAR(), MONTH(), DAY(), DOW(), CDOW(), HOUR(), MINUTE(), and SECS() are not dependent upon the system clock but use the date value argument.

Two-digit shortcut handling:

Handling of dates with 2-digit years is determined by the use of Set Century ToàRollover. The developer can specify the century to which dates with 2-digit years belong. Values equal to and above the rollover value are considered to be in the specified century; values below the rollover date are considered to be in the following century. The default value for the rollover year is the last 2 digits of the current year plus 50 years - if the current year is 1999, then the rollover year becomes 2049 (1999 + 50).

Recommended practices to develop year 2000 compliant applications:

Use Set Century On

Set Century On causes Visual FoxPro to display dates with 4-digit years during data entry and display. The product default is Set Century Off. In the Off setting, it can be impossible to enter 4-digit dates and 2-digit dates are interpreted based on the setting of Set Century To Rollover.

Note: Regardless of how Century is set, users can enter dates with 2-digit years. These dates will be interpreted based on the setting of Set Century To Rollover.

Use Set Century To Rollover

Handling of dates with 2-digit years is determined by the use of Set Century ToàRollover. The developer can specify the century to which dates with 2-digit years belong. Values equal to and above the rollover value are considered to be in the specified century; values below the rollover date are considered to be in the following century. The default value for the rollover year is the last 2 digits of the current year plus 50 years - if the current year is 1999, then the rollover year becomes 2049 (1999 + 50).

Use the Century Property of Controls on Forms

If the Century Property of a control is set to 1 û On, the century portion of a date is displayed in the control. This property overrides the current setting of SET CENTURY. The default for the Century property in Visual FoxPro 6.0 is 1 û On.

Use the Strict Date Format

Normally, Date and DateTime constants or expressions are interpreted based on the current settings of SET DATE and SET CENTURY at the time the constants or expressions are compiled or evaluated. This means that many date constants are ambiguous since they might evaluate to different values depending upon when they were compiled and what date settings were in effect at compilation time.

To avoid ambiguity, use the strict date format. A strict date evaluates to the same Date or DateTime value regardless of date settings. The strict date format is: ^yyyy-mm-dd[,][hh[:mm[:ss]][a|p]]

Use Strict Date Checking

Setting STRICTDATE to 1 requires that Date and DateTime constants be in the strict date format. Date or DateTime constants that are not in the strict format or evaluate to an invalid value generate an error, either during compilation, at run time, or during an interactive Visual FoxPro session. 1 is the default setting for an interactive Visual FoxPro session. Setting STRICTDATE to 0 means that strict date format checking is off. 0 is the default setting for the Visual FoxPro run time and ODBC driver.

The General tab of the Options dialog box now includes a Year 2000 Compliance drop-down list box, which specifies the setting of SET STRICTDATE. Like other Options dialog items, the value is set for the current Visual FoxPro session, and choosing Set As Default saves the setting to the Windows registry for the next Visual FoxPro session.

It Is Recommended that CTOD( ) and CTOT( ) Not Be Used

If the application has SET CENTURY OFF, search the code for CTOD( ) and CTOT( ) commands and change them to DATE( ) or DATETIME( ) functions. Also, consider using DTOS( ) instead of DTOC( ) if converting from a date to character expression. The DTOS( ) function will return a 4-digit year regardless of SET CENTURY setting.

DATE( ) and DATETIME( ) Functions

The DATE( ) and DATETIME( ) functions now support optional numeric arguments that lets users create year 2000 compliant Date or DateTime values. The enhancements to these functions now provide a preferable method for creating Date and DateTime values; it is no longer necessary to use character manipulation functions to create Date and DateTime values.

FDATE( ) Function

The FDATE( ) function now supports an optional argument that lets users determine the time when a file was last modified without using character manipulation functions. For example, in previous versions of Visual FoxPro, it was necessary to write code such as the following to determine when the Visual FoxPro resource file was last modified:

tLastModified = CTOT(DTOC(FDATE(æFoxuser.dbfÆ)) + æ Æ + FTIME(æFoxuser.dbfÆ)

This code can now be replaced with the following:

tLastModified = FDATE(æFoxuser.dbfÆ, 1)

Other Issues to Consider

The Visual FoxPro 5.0 documentation states that issuing SET CENTURY TO without additional arguments sets the century to the current century. This is only true in the 1900s, because the century is set to 19 regardless of the current century. In Visual FoxPro 5.0 the default rollover value is 0. In contrast, in Visual FoxPro 6.0, SET CENTURY TO sets the century to the current century. Additionally, the value of SET CENTURY TO in new data sessions is initialized to the current century.

In Visual FoxPro 6.0, the default ROLLOVER value for SET CENTURY has changed to the last 2 digits of the current year plus 50 years - if the current year is 1998, then nYear is 48, and the default rollover value becomes 2048 (1998 + 50).

In Visual FoxPro 5.0, the smallest date value that can be expressed is {^0100/1/1}, January 1, 100 A.D. This is because year values less than 100 were rounded up to the nearest century based on the setting of SET CENTURY. The smallest valid date in Visual FoxPro 6.0 is {^0001-01-01}, January 1, 1 A.D. The largest valid date in Visual FoxPro 6.0 is {^9999-12-31}, December 31, 9999 A.D.

In Visual FoxPro 6.0, LUPDATE( ) now queries the Windows operating system to determine the date a table was last updated, allowing users to determine the century in which the table was updated. Still, however, the table header just stores the last 2 digits of the year it was last updated. This is done to ensure backward compatibility with other versions of FoxPro.

Please refer to the white paper, "Year 2000 Date Support in FoxPro"

Note: A date issue has been identified with VFP6.EXE, VFP6R.DLL and VFP6T.DLL. Programs using one of these components to represent dates in an @GET do not display the year correctly when the @GET loses focus. For example, running the following code results in the value of the date field being displayed as 2001 when the TextBox has focus, and 2020 when it does not.

CLEAR

SET CENTURY OFF

dDate = {^1999/04/05}

cString = "Another GET"

@ 1,1 GET dDate SIZE 1,10 FONT "Courier New",10

@ 3,1 GET cString FONT "Courier New",10

READ CYCLE

A product update that addresses this issue is available at http://msdn.microsoft.com/vstudio/sp.

Common development errors dealing with year 2000 date issues:

Developers should take care to validate data entered as dates in addition to resolving ambiguous 2-digit year entries. Although Visual FoxPro provides language and tools to help developers plan for year 2000 compliance, ultimately it is the responsibility of the application (and therefore the developer) to validate data before it is stored permanently in tables. For example, if a user entering warranty expiration dates for new computers enters 04/01/1902, the application should contain logic to reject this date, even though the date exists and is year 2000 compliant.

Visual FoxPro uses a default for SET CENTURY ROLLOVER. The default ROLLOVER value for SET CENTURY is the last 2 digits of the current year plus 50 years. This may or may not be the appropriate setting for a specific application.

Even if SET CENTURY ON is used and dates are displayed with 4-digit years, users can enter dates with 2-digit years. The century will be determined based on SET CENTURY ROLLOVER. This may or may not be the appropriate setting for a specific application.

Using dates with 2-digit years in code can lead to unexpected results. This should be avoided.

Please refer to the white paper, "Year 2000 Date Support in FoxPro"

Note: A date issue has been identified with VFP6.EXE, VFP6R.DLL and VFP6T.DLL. Programs using one of these components to represent dates in an @GET do not display the year correctly when the @GET loses focus. For example, running the following code results in the value of the date field being displayed as 2001 when the TextBox has focus, and 2020 when it does not.

CLEAR

SET CENTURY OFF

dDate = {^1999/04/05}

cString = "Another GET"

@ 1,1 GET dDate Size 1,10 Font "Courier New",10

@ 3,1 GET cString Font "Courier New",10

READ CYCLE

 

To update these components to prevent this from happening, install Visual Studio 6.0 Service Pack 3.

Testing guidelines and recommendations:

Review the application and check the forms (screens) and reports for formatting and other issues related to dates.

Use the SET STRICTDATE command and then compile the application. When users SET STRICTDATE to 1 or 2, this command will detect ambiguous dates during code compilation.

Investigate areas of the product that are not affected by the strict date checking, including:

  • Index tag expressions
  • Property settings, such as in forms, classes, reports, and databases
  • Report, label, and menu expressions
  • Constants used in #Include files

Investigate the code directly, searching for potential issues. Users can use the Visual FoxPro Filer utility to search for specific strings in the source files, such as "CTOD(", that may cause behavior issues.

Test the application under an actual year 2000 situation by setting the Windows system to a date in the 2000s.

 

 

 

Return to Search Screen

Legend of Symbols:
* The product is compliant with recommended customer action. This indicates a prerequisite action is recommended which may include loading a software update or reading a document.
# The product is compliant with acceptable deviations from Microsoft's standard of compliance. An acceptable deviation does not affect the core functionality, data integrity, stability, or reliability of the product.
+ The product is compliant with pending Year 2000 software updates. Future maintenance actions will be recommended shortly. See Product Guide for further details.
Note: Compliance ratings given for each product assume that all recommended actions have been taken.

If after reviewing this information you have additional questions related to this product, click here.

 

YEAR 2000 READINESS DISCLOSURE

ALL COMMUNICATIONS OR CONVEYANCES OF INFORMATION TO YOU CONCERNING MICROSOFT AND THE YEAR 2000, INCLUDING BUT NOT LIMITED TO THIS DOCUMENT OR ANY OTHER PAST, PRESENT OR FUTURE INFORMATION REGARDING YEAR 2000 TESTING, ASSESSMENTS, READINESS, TIME TABLES, OBJECTIVES, OR OTHER (COLLECTIVELY THE "MICROSOFT YEAR 2000 STATEMENT"), ARE PROVIDED AS A "YEAR 2000 READINESS DISCLOSURE" (AS DEFINED BY THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT) AND CAN BE FOUND AT MICROSOFT'S YEAR 2000 WEBSITE LOCATED AT http://www.microsoft.com/year2000/ (the "Y2K WEBSITE"). EACH MICROSOFT YEAR 2000 STATEMENT IS PROVIDED PURSUANT TO THE TERMS HEREOF, THE TERMS OF THE Y2K WEBSITE, AND THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT FOR THE SOLE PURPOSE OF ASSISTING THE PLANNING FOR THE TRANSITION TO THE YEAR 2000. EACH MICROSOFT YEAR 2000 STATEMENT CONTAINS INFORMATION CURRENTLY AVAILABLE AND IS UPDATED REGULARLY AND SUBJECT TO CHANGE. MICROSOFT THEREFORE RECOMMENDS THAT YOU CHECK THE Y2K WEBSITE REGULARLY FOR ANY CHANGES TO ANY MICROSOFT YEAR 2000 STATEMENT. EACH MICROSOFT YEAR 2000 STATEMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. CONSEQUENTLY, MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. MOREOVER, MICROSOFT DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF ANY MICROSOFT YEAR 2000 STATEMENT IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY MICROSOFT OR ITS AUTHORIZED REPRESENTATIVES SHALL CREATE A WARRANTY OR IN ANY WAY DECREASE THE SCOPE OF THIS WARRANTY DISCLAIMER. IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER REGARDING ANY MICROSOFT YEAR 2000 STATEMENT INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS, PUNITIVE OR SPECIAL DAMAGES, EVEN IF MICROSOFT OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE FOREGOING LIMITATION MAY NOT APPLY TO YOU. THE INFORMATION CONTAINED IN EACH MICROSOFT YEAR 2000 STATEMENT IS FOUND AT THE Y2K WEBSITE AND IS INTENDED TO BE READ IN CONJUNCTION WITH OTHER INFORMATION LOCATED AT THE Y2K WEBSITE, INCLUDING BUT NOT LIMITED TO MICROSOFT'S YEAR 2000 COMPLIANCE STATEMENT, THE DESCRIPTION OF THE CATEGORIES OF COMPLIANCE INTO WHICH MICROSOFT HAS CLASSIFIED ITS PRODUCTS IN ITS YEAR 2000 PRODUCT GUIDE, AND THE MICROSOFT YEAR 2000 TEST CRITERIA.

ANY MICROSOFT YEAR 2000 STATEMENTS MADE TO YOU IN THE COURSE OF PROVIDING YEAR 2000 RELATED UPDATES, YEAR 2000 DIAGNOSTIC TOOLS, OR REMEDIATION SERVICES (IF ANY) ARE SUBJECT TO THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT (112 STAT. 2386). IN CASE OF A DISPUTE, THIS ACT MAY REDUCE YOUR LEGAL RIGHTS REGARDING THE USE OF ANY SUCH STATEMENTS, UNLESS OTHERWISE SPECIFIED BY YOUR CONTRACT OR TARIFF.


 

Monday, September 20, 1999
1999 Microsoft Corporation. All rights reserved. Terms of use.

This site is being designated as a Year 2000 Readiness Disclosure and the information contained herein is provided pursuant to the terms hereof and the Year 2000 Information and Readiness Disclosure Act.