BUG: SET("FILTER") Converts Dates to Current Date Format (274011)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q274011 SYMPTOMS
If you set a filter on a table involving a date field and then use the SET("FILTER") function to see the filter, the date is converted according to the current SET DATE setting. This is particularly likely to cause problems if SET STRICTDATE is set to 1 or 2 in Visual FoxPro version 6.0. This behavior also applies to the FILTER() function.
RESOLUTION
The following code saves and restores the filter properly:
*!* Save the current filter
lcSetDate = SET("DATE")
lcSetMark = SET("MARK")
SET DATE TO YMD
SET MARK TO "-"
lcSetFilter = SET("FILTER")
lcNewSetFilter = STRTRAN(lcSetFilter, "{", "{^")
SET DATE TO &lcSetDate
SET MARK TO "&lcSetMark"
*!* Restore the old filter
SET FILTER TO &lcNewSetFilter
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbCodeSnippet kbDSupport kbvfp500aFIX kbXBase KB274011 |
---|
|