Date sort
-
Hi, is there a way to sort date-time column?
If I try it sorts like:
01/11/2017 18:22
01/12/2017 05:40
01/12/2017 20:17
02/11/2017 10:31
02/11/2017 16:18
02/11/2017 17:38
02/12/2017 23:55
03/11/2017 16:07
03/11/2017 20:44
03/11/2017 22:01
…This dates are generated in php foreach:
<table class="tablesorter {sortlist: [[0,0]]}"> <thead> <tr><th>Date</th></tr> </thead> <tbody> <?php foreach ( $sent_list as $lista ) { ?> <tr> <td> <?php $date= new DateTime($lista[ts]); echo $date->format('d/m/Y H:i'); ?> </td> </tr> <?php } ?> </tbody> </table>
I can’t share link because is in a private area, sorry.
Thanks
Fosco
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Date sort’ is closed to new replies.