Detention time is how much time the water spends in the sedimentation tank.
detention time = tank volume
incoming water flow rate
If the incoming flow rate is high, then the water will spend less time in the tank.
If the incoming flow rate is low the water will spend more time in the tank.

Calculate the detention time for the example given.
detention time = tank volume
incoming water flow rate
detention time = (30 x 7 x 4)
0.5
detention time = 840
0.5
detention time = 1680 seconds
detention time = 28 minutes

Detention time is inversely proportional to the incoming flow rate.
increase flow rate = decrease in detention time
decrease in flow rate = increase in detention time
increase in detention time = decrease in flow rate
decrease in detention time = increase in flow rate
If you need more practice, use the worksheet provided to practice calculating detention times.
Worksheet - calculating detention times (Word doc
100 kb)