I want to convert date format as 5/Sep/2015 11:53 AM using Linq To Entities. Please see my code below.
public string DeliveryRequiredOn { get; set; }
var _orderdetails =
(
from o in context.orders
where o.StoreId == _storeId
&& o.CustomerId == _customerId
&& excludeStatusId.Contains(o.OrderStatusId.Value)
select new OrderView()
{
OrderId = o.OrderId,
StoreId = o.StoreId,
DeliveryRequiredOn = o.DeliveryRequiredOn.ToString("dd/MM/yyyy HH:mm:ss"),
BaseTotal = o.BaseTotal,
}
).ToList();
How to do this using Linq.
"dd/MM/yyyy HH:mm:ss", but that's a different format. Can you please be more specific as to what you want?