when can i test?

can i take a test 19 days after unprotected sex and have the test be accurate? or should i wait longer if so how much longer?