Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

compare two dates and sort array of objects

your_array.sort ( (a, b) => {
      return new Date(a.DateTime) - new Date(b.DateTime);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #dates #sort #array #objects
ADD COMMENT
Topic
Name
1+9 =