Six weeks
Six weeks is roughly what it takes to train a habit—based on no science or data whatsoever. Six weeks feels like a solid base of time to build something on, but not too oppressive to get started. A chunk of time with a little, but not too much, heft.
It's something I've told other people before: six weeks to get a habit going, six months to start seeing changes come from the habit. That one is also a little light on the science and data. I've never used that advice in any way to plan my own habits. (Oscar Wilde, from An Ideal Husband: "I always pass on good advice. It is the only thing to do with it. It is never of any use to oneself.") Here I am now, thinking about it.
Let's consider running. I am now a decade beyond somewhat competitive running (if you squint at the past, maybe stretch the facts a little). But I still run fairly regularly to keep in what I call Maintenance Shape—good enough condition to build on, but mainly just good enough condition to not have to buy newer, larger clothing. When I want to build on that Maintenance Shape, usually I start planning out distance per week: 30 km next week; then 35 km per week; then so on and so on. Linear into the future. But maybe the first step isn't planning the distance or capacity building, but just getting the habit going regardless of the amount. Six weeks of running six or seven days a week of even relatively small distance just to make the new seem normal, to make the different the default. If I can do that much, then it's just adjusting the quantity of an existing habit. Seems valid at a glance.
I mean I think it takes six weeks to train a good habit—something new, something you choose to do. It probably takes about six days or six hours to train a bad habit. And the bad habit is more fun besides.