Q Q. John Chen Jul 8, 2005 #1 I'd like to convert a DateTime value into XML date format. 1999-02-03T00:00.0000000-05:00 What is the easy way?
I'd like to convert a DateTime value into XML date format. 1999-02-03T00:00.0000000-05:00 What is the easy way?
G Guest Jul 8, 2005 #2 Thieving from http://winfx.msdn.microsoft.com/lib...html/c4a942bb-2651-4b65-8718-809f892a0659.asp In order to get the actual string format you are looking for, try... YourDateTimeInstance.ToString("yyyy-MM-dd'T'HH:mm:ss.fffffffZ")); Brendan
Thieving from http://winfx.msdn.microsoft.com/lib...html/c4a942bb-2651-4b65-8718-809f892a0659.asp In order to get the actual string format you are looking for, try... YourDateTimeInstance.ToString("yyyy-MM-dd'T'HH:mm:ss.fffffffZ")); Brendan
Q Q. John Chen Jul 8, 2005 #3 Cap Z is for Utc DateTime Since I just using my local so DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffffffzzz"); works for me. I also found following works. string x = System.Xml.XmlConvert.ToString(DateTime.Now); Thanks Brendan. You helpped me big time or I would just build dataset and tables column by column. John p.s. I also put the unanswerd Q to the Xml group see if they can help.
Cap Z is for Utc DateTime Since I just using my local so DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffffffzzz"); works for me. I also found following works. string x = System.Xml.XmlConvert.ToString(DateTime.Now); Thanks Brendan. You helpped me big time or I would just build dataset and tables column by column. John p.s. I also put the unanswerd Q to the Xml group see if they can help.