Time format

Time format

julliaathaydejulliaathayde Posts: 1Questions: 1Answers: 0
edited September 2018 in Free community support

Hello!

This message is being translated, so first of all I apologize for any mistake.

In my table, I have a column that displays times of requests made. I would like to know if DataTables has any option to display time in HH: MM format.

I've tried using columnDefs: [{"type": "date", "targets": [0]}] but it did not work as I expected.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @julliaathayde ,

    This blog post here talks about time (and date) formatting using the Moment.js library. You can also use columns.render to change how your data looks. Hopefully that'll do the trick,

    Cheers,

    Colin

This discussion has been closed.