I think it may take from a season to infinity. There were people who did without - this is NOT recommended.
Much depends on how much of a natural you are and how much time on the water you can get.
I would start with getting 100% competent and comfortable with any small dinghy
(or a small keelboat, but I personally recommend an open dinghy
like a Laser, a Mirror or anything else that can capsize) in any wetaher (sure, start at the light wind
Basically, if you can deliver a small open boat across a big rough lake on a very windy day, it is time to learn basic navigation (easy) and then try to get some sea miles prior to going across. There IS a major step up as you go from the lake to the ocean - the WAVES
are much bigger, much more dangerous here. Never underestimate the impact of waves on sailing across any big open water.
So, to sum up, I think given natural talent, dedication and devotion it is not less that one year project