User-195907812 posted
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)...
<registration_submitted>2011-07-13T00:00:00+01:00</registration_submitted>
Live system (incorrect)...
<registration_submitted xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Year>2011</Year>
<Month>7</Month>
<Day>13</Day>
<Hour>0</Hour>
<Minute>0</Minute>
<Second>0</Second>
<Millisecond>0</Millisecond>
</registration_submitted>
Two questions...
- 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).