Custom sort order question
Custom sort order question

I have two columns in a DataTable that contain FAT filesystem dates formatted for US users like this: 11/16/2015 10:56:00
Naturally when I sort these columns they're sorted as text. How can I sort them by date and time as the user would expect?
This discussion has been closed.
Replies
Hi @Boilermaker80 ,
We use Moment.js, as it's excellent for all time/date based operations. See blog post here.
Cheers,
Colin
Thanks! That works great. I noticed in the blog post that it's possible to download Moment.js as part of the DataTables CDN download, but don't see an option to do that on the Downloads page. How would that be done?
Hi @Boilermaker80 ,
Excellent, glad all working. The datetime-moment.js is on the CDN, but Moment.js is third-party so you'll need to download that from their site (I tend to use here).
Cheers,
Colin