Date-time changes when I move it from my dataset and into an XML-document. RRS feed

  • Question

  • Hi, I have problems with with the date-time-format when writing my dataset into an XML-document (I use VB).


    In my Dataset I have date-time on the format, "2007-07-31 14:39:15", but when I have put it into the XML-document it has the format "2007-07-31T14:39:15+02:00". I don't like these superfluous "T" and "+02:00".


    I read at the first page of this forum-page that there is a general problem when transforming date to XML, and that one should use ToString-method before inserting it into the XML-document. But I can't use the ToString method on a Dataset - can I?


    (When moving my Dataset "tempDS" into the XML-document I use:

    Dim xmlDoc As System.Xml.XmlDataDocument = New System.Xml.XmlDataDocument(tempDS).)


    Is there an easy solution on how I can get such a date-time-element from a dataset into the XML-document without these superfluous "T" and "+02:00"?


    All the Best!



    Friday, August 10, 2007 11:00 AM