Link to home
Start Free TrialLog in
Avatar of Srinivas_Vengala
Srinivas_VengalaFlag for India

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.
Avatar of ashraf882
ashraf882
Flag of Bangladesh image

Try like this-

SELECT * FROM Table
ORDER BY CAST(Column AS DATE)
Avatar of Srinivas_Vengala

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 .
I ran into problems when sorting with dates and it was sorting the columns as a string.
ASKER CERTIFIED SOLUTION
Avatar of Srinivas_Vengala
Srinivas_Vengala
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial