sorting problem with a date field in gridview
am using a grid view which has a column containing dates in ASP.net 2.0. The data is being pulled from a SQL database by which the datasource is connected through OLEDB. The problem that I am running into is that when I click on the date header to sort the field in the gridview, the dates are sorted as text, i.e. 1/2/2006 shows up before 10/2/2005. Is there a way that I can explicitly define this column as a date type in ASP.net so that it sorts correctly? And in MySQL the column is defined as a date type.
|