Folic acid

Hi i know this might be a stupid question but i am asking because i do not know, how long do you have to take folic acid for? I have read somwhere that you should only take it for 12 weeks but my midwife has not mentioned anything to me so im abit confused