That depends on your current fitness level, and how you plan to do the race.
If you're currently inactive, it may take you longer. Average is 5-8 weeks using a Couch to 5k style program, but many people who are starting from a lower level of fitness find that they may have to repeat weeks to be successful; it may take you a little longer. :) If you're walking, you may be able to breeze through, if you're running, it may take longer. It just kind depends!
I suggest that you check out the Sparkpeople 5k your way training plans; I walked my first 5k with them in 5 weeks, and had a great time! Running is taking me longer... I need to upgrade my running shoes.
Here's the link, they fit right into your fitness tracker! www.sparkpeople.com/myspark/training-plans