Some answers here already, but I'll give my own too:

The equation you have (\( t=\frac{-v_0 \pm \sqrt{v_0^2+2as}}{a} \)) is the equation from Marijn (\( s=v_0 t + \frac{1}{2}a t^2 \))[1] solved for \(t\) using the

quadratic formula. By using the quadratic formula, you have already "stated" that you have a quadratic equation (i.e. that \(a \neq 0\), because if \(a = 0\) you don't have a quadratic equation anymore).

If \(a = 0\), you can see that the kinematic equation reduces to \( s = v_0 t \), for which the time is easily solvable.

Also, as BrianJ mentions, you have to be sure that the square root is positive. A negative square root states that you will never reach the desired state that you are trying to solve for. An example is that if you tried to solve for a throw of a ball, solving for at what time the ball would be at an altitude of 1 km. Of course your arm is too weak / gravity too strong to throw that high, and you will never reach the wanted altitude, before the ball fall backs towards the earth. This is represented by the resulting square root of a negative number, i.e. undefined solution of \(t\).

[1]: A fairly standard formula, a part of the

kinematic equations. Comes from integrating acceleration to find the speed, and integrating the resulting speed to find the distance.