How to affect timestamp format in XML files written by DataSet

  • Thread starter Thread starter Ueli Amstutz
  • Start date Start date
U

Ueli Amstutz

Hi all

I have a typed DataSet defined through a XML Schema.
At runtime data is stored in a XML file (with DataSet method "WriteXml()").

For fields defined as XML DateTime I get the following in the XML file:

2003-06-19T00:00:00.0000000+02:00

Is it possible to affect the format which will be used for storing DateTime?
(I'd like to have something like "2003-06-19 00:00")

Any hints?

Thanks in advance!

Ueli
 
Hi Ueli,

I am pretty sure you can't but you can apply an xsl transformation on
generated xml afterwards, I guess.
 
Hello Miha

Thanks for the quick answer.
Meanwhile I came to the same result (I've inspected DataSet implementation
with ILDASM - it seem's that just and always XMLConvert::ToString() is
called)

Regards

Ueli
 
Hi Ueli,


Ueli Amstutz said:
Hello Miha

Thanks for the quick answer.
Meanwhile I came to the same result (I've inspected DataSet implementation
with ILDASM - it seem's that just and always XMLConvert::ToString() is
called)

Smart man.
However, if you want an easier alternative you should take a look at
Reflector (decompiler)
http://www.aisto.com/roeder/dotnet/
 
Back
Top