pregnancy test

my last period was november 2nd, when is the earliest time i can take a pregnancy test if i had sex on november 18th?