Having never declared bankruptcy I wouldn't know, but I would assume you have to work out something will all your creditors, so I would say it depends on how many creditors you are working with. It can't be more than 6 months though.
I've known people who have done Chapter 7 - which is the complete removal of debt, to put it simply - and it has taken anywhere from 2 to 6 months to complete the whole process. However, much of that is just waiting.