Depo Shot Question!

Gabrielle
How long should I wait before I have sex for it to kick in. The Dr I saw said 2 different things. (Two different drs) one said 2 weeks and one said 24 hours. I've never heard of either working so quick. Should it be 30 days to be safe?