I have created a C# class file by using a XSD-file as an input. One of my properties look like this:
private System.DateTime timeField; [System.Xml.Serial
Put [XmlIgnore] on the Time property.
Then add a new property:
[XmlElement(DataType="string",ElementName="Time")] public String TimeString { get { return this.timeField.ToString("yyyy-MM-dd"); } set { this.timeField = DateTime.ParseExact(value, "yyyy-MM-dd", CultureInfo.InvariantCulture); } }