I'm using Mvc 4. The following is my code.
@Html.Bootstrap().ControlGroup().DisplayTextFor(m => m.BirthdayDate).Label().LabelText(Person.Resources.Global.BirthDay);
It's display the data with date and time. I want to display only date. How to do that ?
Already I've tried with BirthDay.value.ToShortDateString() and BirthDay.ToString("dd/mm/yyyy"). But this gives error, since BirthDay is Nullable DateTime
I got the following error if i use BirthDay.value.ToShortDateString() and BirthDay.ToString("dd/mm/yyyy") and someDate.Value.ToShortDateString()
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.