D
David
I am using .Net 2.0 and VS2005 with SQL server db. The datetime columns on
SQL have the date and time in them. How can I display just the short date
format (e.g. a datetime of 10/19/2006 11:23:57 AM to show as just
10/19/2006)? I do not want to use the SQL CONVERT on the query because it
affects the sorting of the column in a GridView. If I leave the date and
time together, I get the correct sort. Below is a sample of my textbox on
the GridView column:
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("updated_datetime")
%>'></asp:TextBox>
Thank you.
David
SQL have the date and time in them. How can I display just the short date
format (e.g. a datetime of 10/19/2006 11:23:57 AM to show as just
10/19/2006)? I do not want to use the SQL CONVERT on the query because it
affects the sorting of the column in a GridView. If I leave the date and
time together, I get the correct sort. Below is a sample of my textbox on
the GridView column:
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("updated_datetime")
%>'></asp:TextBox>
Thank you.
David