Srinivas_Vengala
asked on
Sorting on TimeStamp Column in Grid View
Hi,
I am trying to apply sorting on timestamp column in a grid view. In the DB it is of type timestamp but in the datatable and the wsdl which am using for the grid view population the column is of type string .
How can I apply sorting on that columns without disturbing the declaration. I cannot change to type datetime since it has its string references in many other places .
Can anyone pls let me know .
Thanks.
I am trying to apply sorting on timestamp column in a grid view. In the DB it is of type timestamp but in the datatable and the wsdl which am using for the grid view population the column is of type string .
How can I apply sorting on that columns without disturbing the declaration. I cannot change to type datetime since it has its string references in many other places .
Can anyone pls let me know .
Thanks.
ASKER
I am not querying the database. I am populating the grid using a wsdl info.. In the proxy class also the type of timestamp column is of string .
ASKER
I ran into problems when sorting with dates and it was sorting the columns as a string.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT * FROM Table
ORDER BY CAST(Column AS DATE)