Microsoft KB Archive/316441

= FIX: XMLToCursor Does Not Convert XML Dates with Optional Fractional Seconds and Time Zone =

Article ID: 316441

Article Last Modified on 3/2/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q316441



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, click the following article number to view the article in the Microsoft Knowledge Base:

316964 How to Obtain the Latest Visual FoxPro for Windows 7.0 Service Pack



STATUS
Microsoft has confirmed that this is 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.



Steps to Reproduce Behavior
Paste the following code into a new program (.prg) file named &quot;Test&quot;. 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            <xsd:element name=&quot;tc11&quot; type=&quot;xsd:dateTime&quot; minOccurs=&quot;0&quot; /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <alltypesxm_vfp> 5    2002-10-05T00:00:00.0000000-07:00 2002-10-05T04:04:04.0000000-07:00 </alltypesxm_vfp> </VSData> ENDTEXT

XMLTOCURSOR(strXml,'cDate') ? &quot;Date field dc10 value is imported as:&quot;,cDate.dc10 ? &quot;Date field dc11 value is imported as:&quot;,cDate.tc11 After you run the program, note that Visual FoxPro 7.0 returns an empty date value, which appears on the desktop.
 * code end

Additional query words: kbVFP700sp1fix

Keywords: kbbug kbfix kbcodesnippet kbfaq KB316441

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.