Reputation: 11393
How to format Session datetime value in aspx
itself to get the date part only.
<asp:Label ID="Label1" runat="server" Text='<%#Session["start_date_lect"]%>'></asp:Label>
Upvotes: 0
Views: 175
Reputation: 320
Please modify your code like this:
<asp:Label ID="Label1" runat="server" Text='<%#string.Format("{0:MM/dd/yyyy}",Session["start_date_lect"])%>'></asp:Label>
Upvotes: 1