PRB: Can't Enter Valid Date with SET DATE and @ ... GET Date (113526)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft FoxPro for Windows 2.5
  • Microsoft FoxPro for Windows 2.5a
  • Microsoft FoxPro for Windows 2.5b
  • Microsoft FoxPro for Windows 2.6
  • Microsoft FoxPro for MS-DOS 2.0
  • Microsoft FoxPro for MS-DOS 2.5
  • Microsoft FoxPro for MS-DOS 2.5a
  • Microsoft FoxPro for MS-DOS 2.5b
  • Microsoft FoxPro for MS-DOS 2.6
  • Microsoft FoxPro for Macintosh 2.5b
  • Microsoft FoxPro for Macintosh 2.5c

This article was previously published under Q113526

SYMPTOMS

When you are entering a date with the date format specified as yy/mm/dd and CENTURY set to ON, you cannot enter a valid date.

RESOLUTION

Regardless of the desire for the short date format of yy/mm/dd with SET DATE ANSI and SET CENTURY ON, you must enter the date in the format:
   2001/02/18.
				

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Problem

  1. In the Command window, issue the following commands:
          x=DATE()
          SET DATE ANSI
          SET CENTURY ON
          @ 1,1 GET x
          READ CYCLE
    							
  2. Type "01" (without the quotation marks) and press the ENTER key.
From this point forward, you cannot enter a valid date; instead, the error message "Invalid Date" will always be returned.

Modification Type:MajorLast Reviewed:5/6/2003
Keywords:kbprb KB113526