Are you asking about trouble focusing, or legitimate ADD or ADHD?
If you are just having trouble focusing, then whatever helps helps. Otherwise just practice, keeping time short at first and gradually increasing.
As for ADD and ADHD, it's the same. Meditation is not something I see as an actual treatment, but regular practice will train the brain to focus. However, these are (debatably) actual disorders which can be treated. Meditation, however, may be a way to help calm and focus the mind.
Every time you deliberately choose an action, you are creating a pattern to follow in the future. If you can focus on meditation for thirty seconds, you can increase that to 45 seconds. Some people say to start with several minutes, which is fine. But some people may start off being successful with long stretches of meditation while others who want to meditate start with shorter durations.