How many days to make or break a habit?

How long did it take you personally to make or break a habit?

Whether it was starting to workout regularly or a new hair washing routine or if its quitting cigs or not drinking soda how many days did it take?

I heard it’s 40 days to break a habit and only two weeks to form one

1