Back in July 2024, and perfected in 2025, I wrote an MTA file that converts epoch seconds (i.e., "%_file_mod_datetime_raw%") to "YYYY-MM-DD HH:mm:ss", but I didn't think community members cared about it. Moreover, by shear luck, I figured out the step-by-step calculation/conversion because I wanted to emulate "Date Calculator: Add to or Subtract From a Date β Results", which was an Mp3Tag MTA project I started in 2022, after creating an MTA file that substracts date (i.e., "YYYY-MM-DD HH:mm:ss") from time (i.e., "%_length_seconds%"). Nonetheless, below is my Mp3Tag string Epoch-Unix formula to convert date, regardless of format (i.e., "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", etc), to Epoch seconds, and your hour should be 24-hour format:
$add($ifgreater(1970,%my_year%,$mul(1,'-63113904000'),'0'),%my_second%,$mul(%my_minute%,60),$mul(%my_hour%,3600),$mul($add($if($eql(365,$regexp($num($replace($regexp(%my_year%,'^[^0-9]*[0]*[^0-9]*$','2000'),'-',),4),'^((?:(?<![\d])(?:(?:[1-9][0-9]{2,}|[0-9]{2})(?:[13579][0-13-57-9]|[02468][1-35-79])|(?:[1-9][0-9]{0,})?(?:[13579][0-13-57-9]|[02468][1-35-79]){1}00){1}(?![\d])){1})$',365)),$replace($Right(000$regexp($num(%my_month%,1),'^0*[01]$',1),3),'001','0','002','31','003','59','004','90','005','120','006','151','007','181','008','212','009','243','010','273','011','304','012','334'),$replace($num($regexp(%my_month%,'^0*[01]$',1),3),'001','0','002','31','003','60','004','91','005','121','006','152','007','182','008','213','009','244','010','274','011','305','012','335')),%my_day%,'-1'),86400),$mul($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),70),31536000),$mul($div($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),69),4),86400),$mul($div($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),1),100),'-86400'),$mul($div($add($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),299),400),86400))
Note: in the Epoch formula, the year is the MOST important part of the equation because, alone, the addition of $add($ifgreater(1970,%my_year%,$mul(1,'-63113904000'),'0'),$mul($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),70),31536000),$mul($div($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),69),4),86400),$mul($div($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),1),100),'-86400'),$mul($div($add($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),299),400),86400)) will give you the Epoch seconds of the year entry (i.e., "YEAR-01-01 00:00:00") and then add the rest, such as %my_second%, %my_minute%, %my_hour%, etc.
Therefore, though untested, given that I don't download the beta versions of Mp3Tag, this string below should work to give you the date subtracted from %_length_seconds% using the new script function "$fmtDate(fmt,x)":
$fmtDate(yyyy-MM-dd HH:mm:ss,$add($mul('-1',%_length_seconds%),$ifgreater(1970,%my_year%,$mul(1,'-63113904000'),'0'),%my_second%,$mul(%my_minute%,60),$mul(%my_hour%,3600),$mul($add($if($eql(365,$regexp($num($replace($regexp(%my_year%,'^[^0-9]*[0]*[^0-9]*$','2000'),'-',),4),'^((?:(?<![\d])(?:(?:[1-9][0-9]{2,}|[0-9]{2})(?:[13579][0-13-57-9]|[02468][1-35-79])|(?:[1-9][0-9]{0,})?(?:[13579][0-13-57-9]|[02468][1-35-79]){1}00){1}(?![\d])){1})$',365)),$replace($Right(000$regexp($num(%my_month%,1),'^0*[01]$',1),3),'001','0','002','31','003','59','004','90','005','120','006','151','007','181','008','212','009','243','010','273','011','304','012','334'),$replace($num($regexp(%my_month%,'^0*[01]$',1),3),'001','0','002','31','003','60','004','91','005','121','006','152','007','182','008','213','009','244','010','274','011','305','012','335')),%my_day%,'-1'),86400),$mul($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),70),31536000),$mul($div($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),69),4),86400),$mul($div($sub($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),1),100),'-86400'),$mul($div($add($sub($add(%my_year%,$ifgreater(1970,%my_year%,'2000','0')),1900),299),400),86400)))
Hopefully, in the near future, if I have the time, I can write a much thorough explanation.