What you are looking for is DisplayFormatAttribute :
public class MyModel
{
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime DateChosen { get; set; }
// Other properties goes there
}
And use your Html helper like this :
@Html.EditorFor(x=> x.DateChosen, new { htmlAttributes = new { @id = "choosetime" } })
Edit 1 :
Base on comment, if you need to access the string representation of the DateChosen
property somewhere else in your code, you can update your model like that :
public class MyModel
{
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime DateChosen { get; set; }
public string DateChosenString
{
return DateChosen.ToString("yyyy-MM-dd");
}
// Other properties goes there
}