How to affect timestamp format in XML files written by DataSet

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
 
M

Miha Markic

Hi Ueli,

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

Ueli Amstutz

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
 
M

Miha Markic

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top