asp.net - How do I format a date pulled from a database? -
i trying pull date database , putting on webpage below code:
<asp:label id="label3" runat="server" text='<%# eval("traveldate") %>' /><br /><br />
it pulls date no problem, when shows on page, no matter how formatted in database, seems want display date "6/17/2013 12:00:00am". there i'm missing in vs portion have use format date? i'd prefer "june 17, 2013", option close in access adds day of week in front of it. getting rid of time important.
<asp:label id="txtdate" width="65px" runat="server" font-size="8.5pt" forecolor="#000f9f" text='<%# eval("how_date","{0:dd/mmm/yyyy}") %>'></asp:label>
Comments
Post a Comment