I want to extract a 13 digit Unix timestamp from file name and convert it to local time for sortby,
the code for Evaluator column is below:
d0:date = "1970-01-01 00:00:00";
d0 = AdjustDate(d0,"UTC","local");
regex = "(?:.*)(1[4-9](\d{11}|\d{8}))(?:.*)";
ts = RegExS(name, regex, "\1") as int64;
if(ts<1000000000) return "";
if(ts>1000000000000) ts /= 1000;
return d0 + ts; // date+1 = increase by 1s
the datetime type in script column supports millisecond, while date/time type in evaluator column does not. But evaluator column is faster than script.
In script, Date.Add(1,"i") can increase by 1ms
In evaluator, date + 1 only increase by 1s
I don't understand why they cannot be unified to the same accuracy.. ![]()
