Thursday, 15 March 2012

c# - change datetime format to date format in label -



c# - change datetime format to date format in label -

i want create format of datetime date in asp.net application. possible that.

my code is:

<asp:label runat="server" id="label31" text='<%# eval("birthday")%>' width="150px"></asp:label>

what add together code code alter date only? can utilize tostring function within <%# %>??

its :

<asp:label id="label31" runat="server" text='<%# eval("birthday", "format specifier") %>' />

so format can way want be.

<asp:label id="label31" runat="server" text='<%# eval("birthday", "{0:mmmm d, yyyy}") %>' />

c# asp.net asp.net-mvc date datetime

No comments:

Post a Comment