XML deserializes DateTime format

I have an Xml element that should contain DateTime of Year, Month, Day, Hour, Min, Sec and MS

Later, I need this Xml element to be executed through the XMLDeserializer, in a DateTime object.

I know there are some problems with the execution of the DateTime Format.My question is what is the DateTime format that I have to write an Xml Element, so as soon as I deserialize it using the XMLDeserializer, I will not have problems casting the DateTime object

I would like to answer as follows: {0:MM/dd/yy H:mm:ss zzz}or any other format that will definitely work

+5
source share
2 answers

XmlSerializer XmlConvert, DateTime :

yyyy-MM-ddTHH:mm:ss.fffffffzzzzzz

ISO 8601. .NET o:

dateTime.ToString("o")
+7

. , , date date. , XML out put. , XML-, DE.

, .

2017-06-21T00: 00: 00 + 05: 30

0

All Articles