David Smith

David Smith

  • NA
  • 2k
  • 0

Linq Error

Feb 11 2013 3:51 PM
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();

Answers (1)