Leo Babauta of ZenHabits.com recently writes in his post The Habit Change Cheatsheet: 29 Ways to Successfully Ingrain a Behavior:

3. Do a 30-day Challenge. In my experience, it takes about 30 days to change a habit, if you’re focused and consistent. This is a round number and will vary from person to person and habit [...]