This is an important decision that each individual needs to think very much about. I feel that longer is usually better, within limits. A trip of two weeks is hardly long enough to see very much, since a few days are required simply to overcome jet lag and get your bearings. This sort of trip can leave you in a whirlwind, not quite sure what is what. Two or three months, if possible, allows the flexibility to stay in a place you enjoy without guilt, while seeing the sights that interest you the most without a huge rush.
Many people take as much as a year to travel, sometimes with the idea of circling the globe.
The trick is to decide what you want to do, and can afford. A few months is best, if possible. This is a very critical issue for each traveller. I went on my own, and was very happy that I did. A trip like this alone is an opportunity for personal growth that is not easily duplicated.