In fact, research by behavioural scientists (European Journal of Social Psychology) suggests that it takes more than 2 months - 66 days to be exact - for a new habit to form and before a behaviour becomes automatic.
Here's a reminder of the main points: