Prenatal vitamins timeline

For how long to take prenatal vitamins after getting pregnant? Is it for 12 weeks or what?