public JsonResult GetAll()
{
Entities contextObj = new Entities();
var employeeList = contextObj.CCFFares.ToList();
//return Json(employeeList, JsonRequestBehavior.AllowGet);
return this.Json((from obj in contextObj.CCFFares
select new
{
ID = obj.ID,
Departure_Airport = obj.Departure_Airport,
Destination = obj.Destination,
Departure_Date = obj.Departure_Date.ToString(),
Return_Date = obj.Return_Date.ToString(),
Airline = obj.Airline,
Fare = obj.Fare,
Offer_Ends = obj.Offer_Ends,
Ailine_Class = obj.Airline_Class
}), JsonRequestBehavior.AllowGet);
}
I got an issue where i need to show the date in dd/mm/yy but i am receiving in this manner 2/20/2017 12:00:00 AM what i really dint want to and when i bind the value in view without to string conversion i do get the date time in this way " /Date(1479600000000)/ "where i need to show the date in dd/mm/yy simply can someone guide me on this please !