I need to check if a string is a date or not. If the string is a date then I need to sort it by ascending order.
I am getting values like
d["dates"] has values ["1/10/1978 0:00", "2/3/1988 0",.....,"1/10/1978 23:00"].
First I need to check whether it is date or not if its date I need to sort ascending order.
Any help is good.
I have tried this
var date = Date.parse(d["dates"]);
if(isNaN(date)){ console.log('not date')}