AppleScript problems with dates and custom metadata

I’ve posted my solution to your problem in a new thread

It is, of course, in JavaScript (and I’d rather do something very bad to myself than try to write that in AppleScript). I tried it out with (only) two records here, one linking to the other. And I decided to use “name==Wednesday 7 July 2021” as search criteria, assuming that you really named your files in DT that way. Otherwise, you’d have to change that (the search string, that is). When I used just “Wednesday 7 July 2021”, I got far too many results. Also, limiting the search to just the name should speed it up a bit.