This first part gives me a list of distinct DateTimes down to the minute and second which is more detail than I want.
Code: Select all
var dates = (from those in db.RTPCR_CNDATs
select those.UPLOADDATE).Distinct().OrderByDescending(d => d.Value).AsQueryable();
Returns:
...
{1/24/2012 12:54:15 PM}
{1/24/2012 12:54:14 PM}
{1/18/2012 3:50:56 PM}
{1/18/2012 3:50:55 PM}
... etc.
Then this second part gives me a list of short dates but they are not distinct and I'm not finding where and how to get that distinct list.
Code: Select all
var dateResults = from d in dates.ToList()
select new { d.Value }.Value.ToShortDateString();
Returns:
...
"1/24/2012"
"1/24/2012"
"1/18/2012"
"1/18/2012"
... etc.
Thanks!