473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

WriteXml, DateTime, and Timezone data

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
Nov 12 '05 #1
0 1216

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Symon R | last post by:
This is a bit of a weird one that I haven't yet been able to solve - I'm hoping someone out there can disprove my findings and tell me where I've gone wrong! I have designed a web service that...
4
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an...
1
by: Adam Monsen | last post by:
Say I have the following datetime object: >>> from datetime import datetime >>> d = datetime(2005, 8, 10, 15, 43) I happen to know this is a local time from the Netherlands, so I assume the...
1
by: James | last post by:
I need to import a bunch of data into our database for which there's a single entry each day which occurs at the same time every day in local time - so I need to convert this to UTC taking into...
4
by: GiriT | last post by:
Would appreciate some insight into how people are dealing with the implicit conversion of timezones that .NET does. If a server in one timezone delivers up a typed dataset to a component in...
3
by: asanford | last post by:
I want to create a web service that allows the caller to pass a DateTime to the web service (that is, create a web method such as void MyWebMethod(DateTime dt).) However, I want to be able to...
0
by: David Pratt | last post by:
Hi. I am creating a couple of small methods to help me manage time from UTC as standard but I am getting strange results. If I start with a datetime of 2005-12-12 14:30:00 in timezone...
5
by: iulian.ilea | last post by:
Is correct to have a varchar field and insert dates of type dd/mm/yyyy into it? I choose this method because I have an application that runs on more than one server. So, if I used a datetime field...
7
by: Looch | last post by:
All, I'm using a WinForm app that calls methods on a remotable object. The app server hosting the object is in New York. Using the same exact application, a Sql Server 2005 datetime column's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.