Generally speaking, 100-120hrs is considered the industry standard, so taking a course of at least that length is recommended. Anything less that that wouldn't be worth the paper it's written on.
Duration is not the only consideration though. Whether an online course is good enough or not depends very much on where you want to work and whom you want to work for. If an employer accepts online courses, it will be fine. However, an increasing number of employers around the world refuse to accept them. Furthermore, online qualifications are not accepted anywhere in the Middle East or in native English-speaking countries, such as the UK, the US, Canada, Australia, NZ, etc.
My advice, as always, is to do your research BEFORE investing in a course. A cheap course may end up being a poor investment.