I'm using SQL Server 2005 express I have a datetime field in a table witch contains date and time.
I want to select distinct the dates from the table ignoring the time part.
I used this code but the order by is ignored ! (the generated sql doesn't contain order by) :
var dates = (from c in db.Comments
orderby c.Time descending
select c.Time.Day + "/" + c.Time.Month + "/" + c.Time.Year).Distinct();
Any ideas on how to do this are welcome.
Thanks