How i can change date format to be like this : 26-october 22:01:12
Running with Laravel and vue.js
if (sortKey === 'created_at' || sortKey === 'started_at_local') {
data = data.sort(function (a, b) {
// We get attributes 'receptionDate' because it has a normalize date format in contrary to 'created_at' or 'started_at_local'
a = Date.parse(a['receptionDate']);
b = Date.parse(b['receptionDate']);
return (a === b ? 0 : a > b ? -1 : 1) * order;
});
I expect the output 2019-03-26 08:29:23
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire