I have a DataTable according to the Client Requirement it can contain invalid date say "00/00/1999",NULL,Empty String.(Typed DatSet)
When i collect them as enumerables i wish to convert any of those invalid forms to empty string.
(i.e)
EnumerableRowCollection<DataRow> query =
from order in _table.AsEnumerable()
select
new {
OrderDate=
string.IsNullorEmpty(Convert.ToString(order.Field<DateTime>("OrderDate"))
||
(How to check Date is Invalid date)
? String.Empty : order.Field<DateTime>("OrderDate")
}
How to check whether a Date is a valid Date or not?