PRB: Century Not Picked Up from Date & Time Control Panel

Last reviewed: March 20, 1998
Article ID: Q156009
3.00b MACINTOSH kbenv kbprg kbprb

The information in this article applies to:

  • Microsoft Visual FoxPro for Macintosh, version 3.0b

SYMPTOMS

Dates entered into memory variables, date fields, or date and time fields without the century default to the 20th century (that is, 1900s). This behavior occurs even if the century in the Date & Time control panel is set to a year in the 21st century (that is, 2000s).

STATUS

This behavior is by design.

MORE INFORMATION

Visual FoxPro expects that "19" is the default for the century. The DATE() function reports the correct century, however, since it reads the system date.

Steps to Reproduce Behavior

  1. In the Macintosh Date & Time control panel, change the year to 2000 or anything later.

  2. In the Visual FoxPro Command window, enter the following commands:

          SET CENTURY OFF
          x={05/15/05}
          ? x
    

    You get "05/15/05" on the Visual FoxPro desktop.

  3. Now enter the following commands in the Command window:

          SET CENTURY ON
          x={05/15/05}
          ? x
    

    You get "05/15/1905" on the Visual FoxPro desktop.

  4. Remember to set the system date back to the correct date.


KBCategory: kbenv kbprg kbprb
KBSubcategory: FxenvGeneral FxprgGeneral
Additional reference words: 3.00b kbdsd VFoxMac
Keywords : FxenvGeneral FxprgGeneral kbenv kbprb kbprg
Version : 3.00b
Platform : MACINTOSH


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION 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.

Last reviewed: March 20, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.