Sorting by human readable dates

Sorting by human readable dates

nickdavies791nickdavies791 Posts: 2Questions: 2Answers: 0
edited September 2018 in Free community support

Is there a way to sort a column by a human readable date?

I use Laravel, and use the Carbon date package with the diffForHumans() method to convert my dates to human readable format i.e. 3 days ago, 5 minutes ago etc.

Datatables seems to sort numerically and alphabetically.



  • allanallan Posts: 49,472Questions: 1Answers: 7,270 Site admin

    This plug-in uses Moment for parsing date strings, which can parse that kind of information.

    Although if you have the original unformatted date as well you should probably use orthogonal data.


Sign In or Register to comment.