My apologies. I thought I posted this, at least a variation of it, back in October 25th 2022. Nonetheless, this SIX "$regexp(x,e,r,c)" string will CONVERT "MM/DD/YYYY HH:MM:SS am/pm" into "YYYY-MM-DD HH:MM:SS" (24-hours). For example, "03/25/2024 10:44:24 PM" will be converted to "2024-03-25 22:44:24". Likewise, if your date string is "DD/MM/YYYY", you should change the "$3-$1-$2", in $regexp(%_file_mod_datetime%,'^(?<![\d])(\d{1,2})\D{1,}(\d{1,2})\D{1,}(\d{4})(?![\d])(?=[^\n]*$)',$3-$1-$2,1), INTO "$3-$2-$1".
FULL STRING:
$regexp($regexp($regexp($regexp($regexp($regexp(%_file_mod_datetime%,'^(?<![\d])(\d{1,2})\D{1,}(\d{1,2})\D{1,}(\d{4})(?![\d])(?=[^\n]*$)',$3-$1-$2,1),'(?<![\d])(0?[1-9]|1[0-1])(?![\d])(?=(?:[:]\d{1,2}){2}[\W_]*PM)',$add($regexp(%_file_mod_datetime%,'^.*(?<![\d])(0?[1-9]|1[0-1]):(\d{1,2}:\d{1,2})(?![\d]).*$',$1),12),1),'(?<![\d])(?:12)(?=(?:[:]\d{1,2}){2}[\W_]{0,}AM)',00,1),'[[:alpha:]_, \t]+',' ',1),'\s+$|^\s+',,1),'(?<![\d])(\d)(?![\d])',0$1)
LASTLY, below, this is the string that I use for Columns sorting (see attached image of results):
$regexp(%_file_mod_datetime%,'(?<![\d])(\d)(?![\d])',0$1) ⟷ $regexp($regexp($regexp($regexp($regexp($regexp(%_file_mod_datetime%,'^(?<![\d])(\d{1,2})\D{1,}(\d{1,2})\D{1,}(\d{4})(?![\d])(?=[^\n]*$)',$3-$1-$2,1),'(?<![\d])(0?[1-9]|1[0-1])(?![\d])(?=(?:[:]\d{1,2}){2}[\W_]*PM)',$add($regexp(%_file_mod_datetime%,'^.*(?<![\d])(0?[1-9]|1[0-1]):(\d{1,2}:\d{1,2})(?![\d]).*$',$1),12),1),'(?<![\d])(?:12)(?=(?:[:]\d{1,2}){2}[\W_]{0,}AM)',00,1),'[[:alpha:]_, \t]+',' ',1),'\s+$|^\s+',,1),'(?<![\d])(\d)(?![\d])',0$1)
