The pill

I just got the pill like two weeks ago is that long enough for it to be affective I haven't had vaginal sex without a condom but we did anal with out one and may have gotten pre cum near my vagina? But is two weeks long enough