Last post Jul 18, 2011 11:55 PM by Damon Liu - MSFT
Jul 13, 2011 07:20 AM|RageRiot|LINK
I have a problem retrieving dates from a MySQL database between my test and live environments.
I am retrieving a bunch of records from a MySQL database and moving this data to a dataset.
Dates are stored on both MySQL servers as "2011-07-13"
When I move the data in to a dataset, the dates are as follows:
Test system (correct)...
Live system (incorrect)...
<registration_submitted xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- Does anyone know what is causing the difference?
- How can I modify my code to store dates in the desired format (as the test system).
Jul 13, 2011 09:50 AM|RageRiot|LINK
I just dumped the dataSet to an XML file, this is what I found:
<xs:element name="registration_submitted" type="xs:dateTime" minOccurs="0" />
<xs:element name="registration_submitted" msdata:DataType="MySql.Data.Types.MySqlDateTime, MySql.Data, Version=188.8.131.52, Culture=neutral, PublicKeyToken=c5687fc88969c44d" type="xs:anyType" minOccurs="0" />
Jul 18, 2011 11:55 PM|Damon Liu - MSFT|LINK
please check your data format get from database,when move it into dataset you can convert it format,
about datetime format you can refer to this link:http://msdn.microsoft.com/en-us/library/aa325278(v=VS.71).aspx