Datatables datetime format
How do you format date in datatables? do you also use moment.js? can i have a sample code?
Thank you
Replies (5)
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'),
},
],
});
});
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Thank you so much it works!!
Hi,
Glad to hear that All the best with your project!
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Your Support Matters!
We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.