I solved the issue by storing the date in string and then creating a getter which parses the date and returns it as DateTime.
Sample code:
[XmlElement("Valid")]
public string _Valid
{
get;
set;
}
[XmlIgnore]
public bool? Valid
{
get
{
if (!string.IsNullOrWhiteSpace(_Valid))
{
return bool.Parse(_Valid);
}
return null;
}
}