31 days, more or less one month, it's proven that you only need that amount of time to create an habit or gett rid of a bad mania.
It is as easy as taking care of following a routine until it becomes a natural thing, something you don't have to think of.

It doesn't matter want you want to achieve:
losing weight, eating healthier, wearing fashionable clothes, studing, working out....

Just keep forcing yourself 1 month.

Sorry if there is something bad written