Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Sorting string column which has date
posted

Hi,

 I have a collection object with column called LastModifiedDate which is a string but stores date value. We have kept it string because if LastModifiedDate is null in database we pass blank values and if some data then we format the date and store in collection. We cannot use nullable datetime as the function is in web service. By saying all these i meant not to ask me to change the datatype of my LastModifiedDate in my collection.

So the same collection gets binded to the xamgrid.. So we are able to see the date but when sorting, the results are not accurate because column is string and it sorts as string. So 01/01/2008 is smaller than 12/30/2007 which should be otherwise.

 So can anyone please suggest how to correct this problem. I tried assigning

Please suggest as fast as possible