0

I am using Jquery DataTables in one of my ASP.NET MVC project. My listing pages contains DateTime columns like CreateOn, LastUpdatedOn etc.

I want to enable sorting on these DateTime columns but the problem is that the DisplayFormat and the data on which I want to sort is different.

Means I want to sort the data by keeping time component of DateTime column but I don't want to display time component.

I used the Ultimate DateTime Sorting Plugin but I can't figure out option in that plugin.

Can anyone please help me?

1 Answer 1

4

Jquery datatables uses data-order attribute in td to order. To order datetime column use this technique that i have used and working fine for me convert your date in seconds then put that in data-order

See the image for more explanation

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.