How long should a band be going/practicing for before the first show?

Also , how long did your band wait?

until you sound incredible together. and you should be writing your own music

Fender Standard Tele (with kill-switch)
PRS SE Custom
Fender Hot Rod Deville
Boss DD-3 Delay
Boss GE-7 Eq
Boss DS-1 distortion
Electro-Harmonix Big Muff
Boss CS-3 Compression
Digitech Whammy
Dunlop ZW-45 Zakk Wylde Signature wah
Depends on your experience. If you've all played in bands before, you could easily play one month AFTER AFTER AFTER you have all the songs DOWN!, as in, play the whole set 10x with your eyes closed.

If your just starting out with your instrument, or its your first time in a band PLEASE take your time. 3 years ago, it took my band 6 months of practice to play one cover song and 2 of our songs. (i have recordings of it hahaha thats fun to look at now).
There's no set time when you should do the first show. You can't go and say "oh 3 weeks is enough time, so let's sign up for a show in 3 weeks". My band did that, they brought me and the lead guitarist into the band approx 2 weeks before the first show. We had to learn 20 cover songs together for the show. It was a rushed production and that fact really showed when we got on stage. Fortunately there was a very small amount of people at the show, but we screwed up a lot and sounded very un-rehearsed and well, crappy. So, all I have to say is wait until you guys sound reasonable before presenting your guys' music in public.
As long as it takes to get your act together. I've put bands together that could play gigs in a month, not exactly polished, but witout serious mistakes, and I've practiced for over 6 months and wouldn't try to book any gigs yet. It depends on the experience of the players, amount of practice you put in and difficulty of the material.

I also once put together a band for a one night show that had never played together at all, we did everything the whole night without ever practicing, or even meeting each other. Called them and got everyone committed, played that weekend. That's an exceptional case, and I made sure I got the very best players I knew, and I knew they could all handle the range of cover tunes we intended to play, went over basic song list and so forth, and made sure there was nothing on the list any one of us was unfamiliar with. It went very well, the club owner loved it and called us back a month later...

That time we had a different drummer, the keyboard player had an attitude (because it wasn't the drummer he tried to drop on us at the last minute, 30 minutes before the gig, and I wouldn't cancel the drummer I had already hired) and he wouldn't sing, we bombed...he was our country singer and the place wanted plenty country, which I don't sing at all.

Dedicated musicians ready to practice at home, not just in the band room, playing material that is not seriously difficult, might be ready in a month or two. Guys practicing once a week in the band room and rarely or never at home, probably won't make it at all, and if they do it will take several months at best. More difficult material means more time practicing it, originals will mean even more time.

So the short answer is:

As long as it takes to get your act together.
Hmmm...I wonder what this button does...