Home
Login
Sign Up
More
Toggle navigation
Home
Category
Questions & Answers
Interviews
Career Advice
News
Books
Countact Us
About Us
Date Format in ASP.NET MVC Form Edit Mode
By
JC.Adinarayana Reddy
On 20 Dec 2016
Categories:
MVC
You might get the date displayed in the TextBox in the below format.
09/05/2013 12:00:00 AM
To remove the 12:00:00 AM part from the text you need to do the following things.
Set the display format in date property.
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")] public DateTime ArrivedDate { get; set; }
Modify the view as below.
<%: Html.EditorFor(model => model.ArrivedDate)%>
Comments
Message :
Submit
Comments
Home
Category
Interviews
Career Advice
News
Books
Countact Us
About Us
Copyright 2016 allinoneweb.net. All Rights Reserved.