Thanks Thomas, you've sent me down the right path here. I used this formula:
{LOGIC(If|Integer|{DATE(DaysBetween|{TASK(ac0f216d-065e-4756-9301-806b2e214217|LastRun|dd/MM/yyyy)}|{DATENOWADD(Days|-20|dd/MM/yyyy)})}|>|20|true|false)}
In the variable window, this evaluates as true against a job that has never run, then when I run that target job (i.e. update LastRun to today), it evaluates false.
When I then transfer that same string to a variable creation step, it works in the same way.
Finally, I tried creating a condition with that string as Value 1 with equals operator against true as Value 2 . That then controls whether that task runs, based on whether the target task ran in the last 20 days.
I'm not sure why your version didn't work, but this was definitely the solution for me - I just hadn't spotted the logic section in the variable builder.
Thanks for your input on this!