Different airlines and countries have different requirements as to when you must take the test. Many will require a negative PCR test up to 72 hours before his flight, but please check the government travel advisories of your destination for exact requirements.