Greetings.
I am using a myDataSet.WriteXml(StringWriter) function (and then using the ToString() function to convert it to a string) to build an XML string based on the contents of my dataset. This in itself works great.
I am then passing this string back to a PowerBuilder module that is taking this XML string and doing what it needs to do with it. This is almost working great as well. It works fine for all datatypes except DateTime (and Date, I presume). The reason DateTime does not work is because of the TimeZone piece at the end. If I strip this off, the PowerBuilder function (that translates the XML into the approprite PowerBuilder object) works just fine. It would appear that PowerBuilder limits you on how you are able to read XML in.
So, my ultimate question is, back on the .NET side, is there a way to create my XML elements -- whose datatypes are DateTime -- without the TimeZone portion? I'd still like to use the WriteXml function, since this is quite handy, but I realize that the solution might not be that simple.
For example,
WriteXml produces: 2006-06-01T00:00:00.0000000-05:00
I need: 2006-06-01T00:00:00.0000000 (No "-05:00" on the end)
I am a newbie to both XML and .NET in general, so the solution could be really obvious (or not). Any help would be greatly appreciated.
Thank you,
Kevin