It is different for everyone. Previously people believed that it took 21 days to form a new habit, but now psychologists say it might be 90 days. It is difficult to say, as it depends on the glycogenesis process when insulin transfers glucose (split form of sugar). In overweight people sugar directly transfers into fat and their weight (as well as craving for sugar) will drop only after their bodies break this pattern. To make the transitioning process easier, a person needs to eat more protein that takes longer time to digest, therefore making a person less hungry and less prone to eating something unhealthy.