There is no set time that you must workout for it to be effective. Even a short workout is better than no workout.
There is generally an inverse relationship between time and effort in a workout. Meaning, the longer your workout lasts, the less effort you are exerting on average.
You can get a very effective workout in a short period of time by increasing the intensity. If you can do the same workload in a shorter amount of time, you have actually worked harder by spending less time working out.
There are several protocols out there for 4-20 minute workouts. These might sound like marketing hype, but if done properly they can be very effective. The key is to exert as much effort as possible in the short timeframe.
If you’re short of time, do not use it as an excuse to not workout. Simply get in a short and intense workout instead.
It should be noted that it is important to properly warm up before training, to ensure you do not cause yourself an injury. After a thorough warm up, you can go ahead and get a short and effective workout.
Some options include a small circuit of exercises where you set a time limit and perform as many reps as possible in a given timeframe (8-20 minutes).
You can use a ‘Tabata’ protocol, which is where you perform 20 seconds of all out effort, and then rest for 40 seconds, and repeat for 12 minutes. Make sure you are genuinely giving it everything in the work phase.
Finally, you can just do your regular
workout, while minimising the rest periods and aiming to complete it as quickly