If you are already seasoned Salesforce administrator or an experienced Force.com developer, you should be able to prepare for the exam in 3-6 weeks.
However if you do not have prior experience on Salesforce.com, you must plan to spend couple of months going through tutorials and working on Salesforce platform before going for the exam.
It is advisable to take formal training before you take the exam.
Please note that the above are just the indicative time lines. You may need more or less time based upon your experience on SFDC. Also the time will depend on how much time you spend per day on preparation.