XML schema:
<xs:element name="DateGenerated" type="xs:dateTime" minOccurs="0" />
XML file is:
<DateGenerated>27/12/2007 10:46:02 AM</DateGenerated>
VB code:
dsControlFile.ReadXml(controlFileName)
The default format of datetime is like "2002-05-30T09:00:00".
However my datetime string is like "27/12/2007 10:46:02 AM".
Solution:
If we want to use ReadXML, we have to make sure datetime string is in fixed standard format "YYYY-MM-DDThh:mm:ss".
So finally what i did is to change datetime to string.