DOCUMENT:Q316441 02-MAR-2002 [foxpro] TITLE :FIX: XMLToCursor Does Not Convert XML Dates with Seconds PRODUCT :Microsoft FoxPro PROD/VER::7.0 OPER/SYS: KEYWORDS:kbInternet kbvfp kbGrpDSFox kbDSupport kbCodeSnippet kbvfp700 _IK283kbfaq ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 7.0 ------------------------------------------------------------------------------- SYMPTOMS ======== Because the XMLToCursor function does not convert XML dates that have optional fractional seconds and time zones, Visual FoxPro returns an empty date value. RESOLUTION ========== To resolve this problem, obtain the latest service pack for Visual FoxPro for Windows 7.0. For additional information, please see the following article in the Microsoft Knowledge Base: Q316964 How to Obtain the Latest Visual FoxPro for Windows 7.0 Service Pack STATUS ====== Microsoft has confirmed this to be a problem in Microsoft Visual FoxPro for Windows 7.0. This problem was first corrected in Visual FoxPro for Windows 7.0 Service Pack 1. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- Paste the following code into a new program (.prg) file named "Test". Save and then run the program. NOTE: The computer that you use to run this code must have a connection to the Internet because the schema retrieves the dates from the microsoft.com Web site. ** code begin TEXT TO strXML 5 2002-10-05T00:00:00.0000000-07:00 2002-10-05T04:04:04.0000000-07:00 ENDTEXT XMLTOCURSOR(strXml,'cDate') ? "Date field dc10 value is imported as:",cDate.dc10 ? "Date field dc11 value is imported as:",cDate.tc11 ** code end After you run the program, note that Visual FoxPro 7.0 returns an empty date value, which appears on the desktop. Additional query words: kbVFP700sp1fix ====================================================================== Keywords : kbInternet kbvfp kbGrpDSFox kbDSupport kbCodeSnippet kbvfp700 _IK283 kbfaq Technology : kbVFPsearch kbAudDeveloper kbVFP700 Version : :7.0 Issue type : kbbug Solution Type : kbfix ============================================================================= 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. Copyright Microsoft Corporation 2002.