The length of time to learn cooking depends on the course and school you choose. Generally speaking, a professional chef's cooking course can be completed in 1-2 years, but it may take longer if you want to further study and become a professional chef.
I hope this information is helpful to you!