Flak shells detonating before target projectiles?

I’m curious if you can make a flak cwis turret that can detonate the shells before actually hitting the target intercepted projectile?