date format in table /Date(1350493200000)/

date format in table /Date(1350493200000)/

ballprogrammerballprogrammer Posts: 11Questions: 0Answers: 0
edited June 2013 in DataTables 1.8
i get json data from database and show to datatables

this date format
[code]
/Date(1350493200000)/
[/code]

i want change to
dd/mm/yy

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Best way is to alter your server-side script to output the format in the way you want. How you do that will depend entirely upon what server language you are using, the database etc. You might want to ask on SO if you aren't sure how to do that.

    Allan
  • ballprogrammerballprogrammer Posts: 11Questions: 0Answers: 0
    ajax get data from server
    [code]
    $.ajax( ... success:{ function1(data) } );
    [/code]

    fucntion add data to table
    [code]
    function1(data){
    // this line i want convert some data format(/Date(1350493200000)/) to dd/mm/yy
    table.fnAdddata(data);
    }
    [/code]
    or
    convert by aoColumnDefs fnRender
    [code]
    "aoColumnDefs": [
    {
    aTargets: [1],
    fnRender: function (o, v) {
    return 'o.aData['date_data'];';
    }
    }
    ],
    [/code]
This discussion has been closed.