I have the following:
What would I add to this to be able to format the date?VB Code:
<asp:Label ID="lblDetails" Text='<%# DataBinder.Eval(container.DataItem, "DateFrom") %>' Font-Bold="True" Font-Size="8" Runat="server"/>
Woof
Printable View
I have the following:
What would I add to this to be able to format the date?VB Code:
<asp:Label ID="lblDetails" Text='<%# DataBinder.Eval(container.DataItem, "DateFrom") %>' Font-Bold="True" Font-Size="8" Runat="server"/>
Woof
Where {0:D} is the format string. You can lookup various date formats here.Code:<asp:Label ID="lblDetails" Text='<%# DataBinder.Eval(container.DataItem, "DateFrom", "{0:D}") %>' Font-Bold="True" Font-Size="8" Runat="server"/>
HTH
DJ