First Baby Scared

Okay ladies. I am 31 weeks along and I want to breastfeed. I have not been asked questions about this yet, but I have questions. When do you know if you're even going to be able to breast feed? I haven't explored formula options as I really don't want to have my baby on formula. I'm nervous because I don't want to be unprepared incase I can't breast feed. What to do?