In MVC Razor view, I am trying to format a DateTime field to display time only. Using below code I am getting error \"Templates can be used only with field access, property acce
I was having the same problem and I have resolved the problem. If you want to convert "LastUpdatedDate" to a specific format then you can try this:
@Html.TextBoxFor(m=>row.LastUpdatedDate, new { @Value = Convert.ToString(row.LastUpdatedDate.ToShortDateString()) })