Well… How long is a piece of string?
The general question is impossible to answer! You must make it more specific.
If your goal is total mastery of all intervals in every musical situation, the answer is probably measured in years. However, if your goal is to recognise a number of intervals reliably enough to help you in your musical life, the answer is measured in weeks.
Depending on your starting point with interval ear training, you will be able to start applying your new interval recognition skills after just a week or two of practice. However, as you see the benefits of interval ear training, you will want to continue – not declare yourself finished with it!