I am trying to convert a row of data from our database values into a xml file. I am using the c# .net xmlTextWriter. Everything is fine but I cannot format the date time value for some reason.
Below is the code I have tried using a String.Format:
xmlWrt.WriteStartElement("", "Call", namespace);
xmlWrt.WriteElementString("Value", namespace, String.Format("{0:dd MMM yyyy HH:mm}", man.orderDateTime));
xmlWrt.WriteEndElement();
In the database the value of the date and time is displayed as: 23 Jul 2015 13:05.
Need it to display as 23 Jul 2015 13:05 but it is displaying as Jul 23 2015 1:05PM in the xml that i am out puting for some reason.