How to format a column with date to different date format?

How to format a column with date to different date format?

loopersloopers Posts: 17Questions: 7Answers: 0

Currently fetching data like so:

columns: [
    {"data": "number"},
    {"data": "first_name"},
    {"data": "blocked_at"},
]

and tried to add columnDefs:

columns: [
    {"data": "number"},
    {"data": "name"},
    {"data": "time"},
],
columnDefs: [ {
    targets: 2,
   render: $.fn.dataTable.render.moment( 'X', 'Do MMM YY' )

but it didn't work. Is there another way to do it?

Answers

Sign In or Register to comment.