manage date fields when are int in the db

Posted by Luca Romagnoli on Stack Overflow See other posts from Stack Overflow or by Luca Romagnoli
Published on 2010-05-10T08:54:07Z Indexed on 2010/05/10 9:04 UTC
Read the original article Hit count: 207

Filed under:
|
|

Hi in my db there is a field "date_start" type integer.

This is the part of form for this field

<div class="editor-label">
                <%: Html.LabelFor(model => model.date_start) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.date_start, new { @class = "calendar" })%>
                <%: Html.ValidationMessageFor(model => model.date_start) %>
            </div>

In the form i want that the field's format is date type. and memorize it in int type after calling a my function for the convertion. How can i manage it?

thanks

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about form