I have used following code :
\'>
You should be able to use something like this:
<asp:HyperLink ID="lnkCreatedDate" runat="server" Text='<%#Eval("CREATED_ON", "{0:dd/M/yyyy}")%>'> </asp:HyperLink>
Use This Code When You Are Not Sure That Your Date Is NULL OR NOT.
<asp:HyperLink ID="lnkCreatedDate1" runat="server" Text='<%# (String.IsNullOrEmpty(Eval("CREATED_ON").ToString())) ? "" : DateTime.Parse(Eval("CREATED_ON").ToString()).ToString("d") %>'></asp:HyperLink>
this should do the trick:
<asp:HyperLink ID="lnkCreatedDate" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CREATED_ON", "{0:dd/MM/yyyy}") %>'></asp:HyperLink>
You Can try THis Also
<asp:HyperLink ID="lnkCreatedDate" runat="server" Text='<%#Eval("CREATED_ON", "{0:d}")%>'> </asp:HyperLink>
You can try this -
<asp:HyperLink ID="lnkCreatedDate1" runat="server" Text='<%# DateTime.Parse(Eval("CREATED_ON").ToString()).ToString("d") %>'> </asp:HyperLink>
I suppose you have a DateTime variable named MyDate:
DateTime MyDate;
If you want juste the date part:
MyDate.Value.ToString("d");
With the day:
MyDate.Value.ToString("D");
Here is a usefull doc PDF Doc