Hi,
Here is an example:
<ItemTemplate>
<asp:TextBox id="txtCloseDate" Text='<%# Eval("CloseDate","{0:dd/MM/yy}") %>' runat="server" />
</ItemTemplate>
You can format it using a method in your code behind too:
<ItemTemplate>
<asp:Label
ID="BeginDateLabel"
runat="server"
Width="80px"
Text='<%# DateFormatter((DateTime)Eval("BeginDate")) %>'>
</asp:Label>
</ItemTemplate>
in your codebehind:
protected string DateFormatter(DateTime date)
{
return date.ToShortDateString();
}
I hope it will help,
Cheers.