How do you format date in datatables? do you also use moment.js? can i have a sample code?
Thank you
Hi,
May I know which frameworks are you using? The datatable JS from the HTML version, laravel (starterkit or Laravel App), or any other frameworks.
Thanks
Hi Faizal,
Im using the html Starterkit of asp.net core 6
Hi,
You can follow this date formatting guide in the official Datatables docs.
$(document).ready(function () {
$("#example").DataTable({
columnDefs: [
{
targets: 4,
render: DataTable.render.datetime("Do MMM YYYY"),
},
],
});
});
Thank you so much it works!!
Hi,
Glad to hear that All the best with your project!
Regards,
Lauris Stepanovs,
Keenthemes Support Team