@{ var value = Model == null ? null : ((DateTime)Model).ToString("HH:mm"); } @Html.TextBox("", value, new { @class = "form-control time edit-time" })