I have the following code to try and return my datetime value from my Editorfor template in the dd/MM/yyyy format without the time value:
@Html.EditorFor(c => c.SelectedContent.ExpiryDate, "{0:dd/MM/yyyy }")
This however is returning also the time value but it is not what I need, how can I return this so it is only the date?
Place the following line above where you declare
ExpiryDate
in your model