Problem with DateTimePicker Value property

J

Joe Cool

If the user or the code does not change the Value property of a
DateTimePicker control, it dfefaults to DateTime.Now, which inclides
the current date and time. I want the value that will ultimately be
serialized to an XML file to be equivalent to DateTime.Today, which is
a date with not time, or more speciically, a time of 12 AM.

So I initialize the Value property to DateTime.Today.

If the user does not select a different date, when the value is
serialized, the time portion becomes:

T00:00:00-04:00

But if the user selects a different date, when serialized, the time
portion becomes:

T00:00:00

The first format with the "-04:00" causes problems in my app later on.
I am wondering A) how come it is even there, and more importantly. B)
how the heck do i get rid of it?!?!?
 
J

Joe Cool

Whats your time zone?

Eastern US. So this is the time zone offset from UT, eh? I wonder why
it is there to begine with, but dissappears if the user selects a
different date?
 

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