When can u test for pregnancy ?!?

Had intercourse at 9;50pm tonight, its 12:10am . Can i test ASAP ? .

thanks.