DateTime
called DataReferencia , I formatted with Attributes
, however when I am in view hh:mm:ss
I just want to date 2/29/2016 .
Model
[Column("sdt_DataReferencia")]
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
[Display(Name = "Referência 01/mm/aaaa")]
public DateTime DataReferencia { get; set; }
View:
<div class="form-group">
@Html.LabelFor(model => model.Boletos.DataReferencia, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Boletos.DataReferencia, new { htmlAttributes = new { @class = "form-control", @Value = Model.Boletos.DataReferencia }, })
@Html.ValidationMessageFor(model => model.Boletos.DataReferencia, "", new { @class = "text-danger" })
</div>
</div>