It really depends. Generally speaking, how long you need to prepare for GMAT depends on your available time after your regular study/job, your efficiency in learning, and your target score.
For me, I want 700+ and have a full-time job. Also, I got to do other things after GMAT. At last, I spend 3 and a half months on preparing GMAT, from middle of Sep to end of Dec.