I have a one table. Table having a enqreceivedtime column with datatype is varchar and another column arriveddate. Now I want to sort arrivedtime with current date.
Data like this
(03:30 PM,10:30 AM, 04:05 PM, 11:08 AM, 08:30 PM, 05:20 AM,12:08 AM )
with current date(18-03-2015). Now I would like to sort the enqreceivedtime like
08:30 PM, 04:05 PM,03:30 PM,05:20 AM,10:30 AM, 12:08 AM. I want display data in sorting the arrivedtime using linq query based on current date. How to write linq query for sorting time . data is coming dynamically... i try like this
public ViewResult Index1(DateTime? Startdate)
Startdate = DateTime.Now.Date;
DateTime Enddate = DateTime.Now; string AM="AM"; var value10 = from res in db.BookingArriveds where (res.BookingArrivedEnquiredDateTime >= Startdate && res.BookingArrivedEnquiredDateTime <= Enddate) orderby res.BookingArrivedEnquiredTime.Contains(AM) descending orderby res.BookingArrivedEnquiredTime descending select res; return View(value10); }