Hey,
I just wrote this to sort an adir array by datetime modified.
If I'm not mistaken, this should avoid any problem with ambiguous dates despite using CTOT().
But it seems like a clunky way to do it. I figured I'd just ask for fun if there are any other creative ways of doing this.
nFiles = ADIR(aa)
FOR i = 1 TO nFiles
aa[i, 5] = DATETIME(YEAR(aa[i, 3]), MONTH(aa[i, 3]), DAY(aa[i, 3]), ;
HOUR(CTOT(aa[i, 4])), MINUTE(CTOT(aa[i, 4])), SEC(CTOT(aa[i, 4])))
ENDFOR
=ASORT(aa, 5)