This article from brain pickings.org was very interesting:
When he became interested in how long it takes for us to form or change a habit, psychologist Jeremy Dean found himself bombarded with the same magic answer from popular psychology websites and advice columns: 21 days. And yet, strangely — or perhaps predictably, for the internet — this one-size-fits-all number was being applied to everything from starting a running regimen to keeping a diary, but wasn’t backed by any concrete data. In Making Habits, Breaking Habits: Why We Do Things, Why We Don’t, and How to Make Any Change Stick (public library) — which also gave us this fascinating read on the psychology of self-control — Dean, whose training is in research, explores the actual science of habits through the existing empirical evidence on habit-formation. He cites one influential study that gives a more concrete answer to the elusive question of how long it takes for a new habit to take root:
So, start the new year off right and start making new, better habits!