I 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? Of course in MySQL the column is defined as a date type and manually appending an ORDER BY clause to the select statement functions correctly. I'm developing in VS 2005 if that makes any difference.
Any help is truly appreciated!
Any help is truly appreciated!