I seem to remember a sermon on overcoming that it takes three months to establish a good habit. I might not be remembering this very well. Granted I remember who delivered this message and we're friends on Facebook, so maybe I could just ask him. If he's anything like me though, he probably doesn't remember unless he has the source somewhere on file. At the time I'm assuming he was quoting some reputable psychology study and knowing him he probably was. Googling the question out online didn't make anything clearer.
Numerous articles claim it only takes 21 days. That sounds a lot easier but I couldn't find any research and my own experience doubts the truth of that.
One article I found made the statement that everyone knows it takes 28 days. There's a convincing source. Kind of sad that I'm the only one who didn't know that. Now I know and if it doesn't work I'll really be disappointed.
Looks to me like that I'm best off relying on my own experience because it all appears to be opinion anyway. I think it depends on the person, the particular habit in question and the environment at the time. I can fall into bad habits with no effort at all but I've tried establishing good habits and some of those don't seem to stick after years of effort.
I'm a writer and am well into a personal challenge to write 30 blog posts/articles in 30 days. A week and a half in and I'm one ahead of the pace. The idea isn't just to accomplish this for thirty days. I'm trying to establish a productive lifetime writing habit. Hard to do and too easy to fall back out of. I've been there before and I know that 21 days or 28 or even three months might not do it.
If you've started a New Year's resolution or are trying to improve yourself in any way, more power to you. Stick to it. It's worth it. Just don't think there is some magic formula.