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 access, single-dimension array index, or single-parameter custom indexer expressions."
<td>@(Html.DisplayFor(m=>row.LastUpdatedDate.ToString("HH:mm:ss")))</td>
Any help please what is causing this error and how to fix it ?
Thanks for your help.