datatables 날짜 포맷

    datatables 날짜 포맷

    datatables 에서 날짜포맷을 사용하고자 한다. head 안에 추가하고 datatable 날짜 포맷을 설정해주면된다. render 함수가 올바르게 표시 되어야 한다. $("#dataTable_p1").DataTable({ columns : [{ "data": "createdDate", render: function(data, type, row){ if(type === "sort" || type === "type"){ return data; } return moment(data).format("YYYY-MM-DD HH:mm"); } } ] });