Typed dataset and save?

  • Thread starter Thread starter Donal McWeeney
  • Start date Start date
D

Donal McWeeney

Hi,

When using a typed dataset is it possible to do the following:

1 - force date values to get saved as just the date part...

"2005-01-28"
not
"2005-01-28T00:00:00.0000000-00:00"

type is defined as type="xs:date" in the schema.


2 - specify a style sheet so that it gets written to the xml that is
generated by the DataSet.WriteXml method.

Thanks

Donal
 
Donald,

I would not do it, however the only thing I know to achieve this is making
the type a "string" (and with that make it completly culture dependend)

I hope this helps?

Cor
 
Hi Donal,

1. Generally, we cannot do this. What we can do is to save all the date and
time information, but display only date when needed.

2. We cannot specify a style sheet when using WriteXml, because WriteXml
doesn't have such overload. We can use an XSLT after the DataSet is written
to xml.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Kevin,

Thanks for the info - I was hoping that there may have been a msdata or
codegen directive that would have solved this...

Thanks

Donal
 
You're welcome. I'm afraid this is the best solution currently.

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top