Posted 17 May 2020, 4:21 pm ESTHi Team,
I am creating date object for one of the columns and sorting on that column. It is sorting properly based on date but not sorting properly based on time. Looks like when it comes to time it is sorting based on string and not actual time. For E.g- 1/1/2020 2PM show after 1/1/2020 9 AM when sorting for latest first.
element.modifiedDate = formatDate(element.modifiedDate, 'yyyy/MM/dd hh:mm', 'en-US');
element.modifiedDate = new Date(element.modifiedDate)
in the above code modified date is a string which I am formatting it as 'yyyy/MM/dd hh:mm' and changing it to date object.