According to THE LOCAL post
So, what if you’re staying in the UK for less than two days? You still need the Day 2 test, because the passenger locator form cannot be completed without the booking reference, and you cannot enter England without the form. So you must pay for a test even if you will no longer be in England when the time comes to use it.
https://www.gov.uk/guidance/travel-to-england-from-another-country-during-coronavirus-covid-19
Passenger Locator Form: To complete 48h before the arrival
You must take a COVID-19 test before you travel to England if you either: have been in a country or territory on the red list in the 10 days before you will arrive in England
It can be an antigen test but it must:
The test must meet performance standards of ≥97% specificity, ≥80% sensitivity at viral loads above 100,000 copies/ml.
When?
You can take the test any time in the 3 days before the service on which you will arrive in England departs.