I have a field in the database, DataHora, and wanted to display on the screen for the user, but in separate fields, being Date and Time.
First displays the Date
@Html.DisplayFor(modelItem => item.DataHora)
Second displays Time
@Html.DisplayFor(modelItem => item.DataHora)
I tried to format using the code below, but it did not work ...
@Html.DisplayFor(modelItem => item.DataHora, {0:dd/MM/yyyy})
Questions?