I am developing the MVC 3 application. In the view I am displaying the name along with created date time. It displayed as a
Nick Moris 27-Mar-13 11:49 AM <--
but I want to display in
Nick Moris 27-Mar-13 11:49 am <--
I have write the below line of code in the partial class for the date time property.
[DisplayFormat(DataFormatString = "{0:dd MMM yy hh:mm tt} ")]
public System.DateTime CreateDateTime { get; set; }
and in the View I am using below code...
@Html.DisplayFor(ModelItem => item.CommentDateTime.ToString("dddd, MMMM d, yyyy a\\t h:mmtt"))
What changes I have to made in the date format ? It showing error.