Obviously the reader doesn't like this format incoming from the response XML.
Wondering if I can reformat this. Trying to convert to DateTime
using the following code with my XmlReader
:
reader.ReadContentAsDateTime();
Obviously the reader doesn't like this format incoming from the response XML.
Wondering if I can reformat this. Trying to convert to DateTime
using the following code with my XmlReader
:
reader.ReadContentAsDateTime();
According to the XML schema spec, date time values should be in ISO8601 format, e.g., something like
Xml readers generally expect dates/times in a very specific format; you can use this yourself using
XmlConvert
:If you are using something else, you'll have to read it as a string and use
DateTime.TryParseExact
(or similar) to specify the actual format string:If you are using
XmlSerializer
, you could use a shim property to do the conversion - let me know if this is what you are doing...