I get this error for the linq below.
Error: at least one object must implement icomparable
var minDate1 = (from c in DataAccess.VolunteerHistoryDataSet.Tables[0].AsEnumerable()
where c["ServiceDateStart"] != DBNull.Value
orderby c["ServiceID"], c["ServiceDateStart"]
select new
{
Date = Convert.ToDateTime(c["ServiceDateStart"])
}).ToList().Min();
Loading
VulpesPosted Feb 11, 2013, 6:56 PM
You'll therefore need to convert them to their actual types - I'd imagine Int32 and DateTime - which do implement IComparable.
So, I'd try:
var minDate1 = (from c in DataAccess.VolunteerHistoryDataSet.Tables[0].AsEnumerable()