I have found a few threads that have dealt with this issue. Though, they are not in a context that is usefull for me. Pretty much, I am trying to convert a DateTime to string, for rendering it into a MVCContrib Grid. Here is how things look inside of my model:
public IQueryable<FindStudentViewModel> GetStudentsProjected()
{
var projectedStudents= from p in FindAllStudents()
select new FindStudentViewModel
{
StudentID = p.StudentID,
FirstName = p.FirstName,
LastName = p.LastName,
EmailAddress = p.EmailAddress,
CurrentCollege = p.CurrentCollege,
IAUTerm = p.IAUTerm,
IAUProgram = p.IAUProgram,
InquirySource = p.InquirySource,
InquiryDate = (string)p.InquiryDate.ToString(),
Status = p.Status
};
return projectedStudents;
}
And of course, LINQ does not like this one bit. Pretty much, I need to be able to convert the InquiryDate into a string, and then order the results by InquiryDate. Thank you in advance.