I try to format the datetime in the view.
<span class="tag">
@Html.DisplayFor(modelItem => item.PostDate.ToString("yyyy"))
</span>
here's the error message I got.
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
how do i fix it?