if its a school dance, you'll be fine,...ask her in the next week or soo...but if its a fancy type thing I'd ask her really soon so she can get a dress, and all that.
Ask her ASAP. If you don't she might go with someone else. Oh and give her like a rose or something. And make sure you don't sound corny when you ask. Goodluck dude.