How can I change the LINQ query in the code below to sort by date in descending order (latest first, earliest last)?
using System; using System.Linq; using S
I was trying to also sort by a DateTime field descending and this seems to do the trick:
var ud = (from d in env orderby -d.ReportDate.Ticks select d.ReportDate.ToString("yyyy-MMM") ).Distinct();