Hello All,
I have an issue when I write a dataset to an XML file. I have a dateTime element and when it is written it writes out the full date and time including milliseconds. I use the DateTime.Now to get the time value. I want to write this without milliseconds. Is this possible DateTime.Now when viewed as a string does not include the milliseconds but it does when it is written.
Any ideas
Regards,
Darren.

Dataset WriteXML and XML dateTime
butterflylion
This is a really annoying "feature".
Thanks for your help.
eastcowboy
So... the only thing you could do is somehow set the value to 0. It will still be writter in the xml file.
Try this:
Dim MyVar As Date = Now
MyVar = MyVar.AddMilliseconds(-MyVar.Millisecond)