Date format order and how to exclude a part of the column when exporting

Date format order and how to exclude a part of the column when exporting

lenamtllenamtl Posts: 265Questions: 65Answers: 1
edited March 2017 in Free community support

My date format is d/m/Y H:i 29/03/2017 14:03 and it's won't order correctly.
I'm using PHP $date = date_create

I have tried to use moment.js from https://datatables.net/blog/2014-12-18 with no luck

So I found a way to bypass the date format problem
<td><span class="hidden">2017-03-29 14:03:02</span> 29/03/2017 14:03</td>

The problem I have with this solution, this is going to export both values 2017-03-29 14:03:02 29/03/2017 14:03
so how can I exclude a part of the column when exporting ?

Thanks

Answers

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1

    I just found another way to order my dates :
    <td data-order="2017-03-29 14:03:02>29/03/2017 14:03</td>
    It's seems to order the date correctly and only one date & time will be exported :)

    I'm still curious about a ways to not export a part of the column.

    Thanks

This discussion has been closed.