fogofogo
08-02-2007, 05:08 AM
Hello,
probably an easy one for most, but I'm trying to grab todays date and insert it into a lable in a template field
<asp:TemplateField HeaderText="ProcessedDate">
<ItemTemplate>
<asp:Label ID="lbldatetoday" runat="server" Text="<% = DateTime.Now().ToString() %>"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
the codes wrong, does anyone know what it should be? also is it possible to format it to yymmdd?
Would I be better off to use findcontrol?
Thanks
probably an easy one for most, but I'm trying to grab todays date and insert it into a lable in a template field
<asp:TemplateField HeaderText="ProcessedDate">
<ItemTemplate>
<asp:Label ID="lbldatetoday" runat="server" Text="<% = DateTime.Now().ToString() %>"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
the codes wrong, does anyone know what it should be? also is it possible to format it to yymmdd?
Would I be better off to use findcontrol?
Thanks