s = ut + 1/2at ^2 is interpreted to be:
s(t) = ut + (a/2)t^2 and this is essentially the function for displacement at time t from an initial position of s(0) = 0 by an object with initial velocity u and constant acceleration a. It can be solved for t by applying the quadratic formula to
(a/2)t^2 + ut - s = 0 to obtain expression(s) for t in terms of s
as others have shown, Some care must be taken in interpreting the results of this approach, if this function is being used to solve a real physical problem. For example, it this represents the vertical height of a ball thrown upward with an initial velocity u at time t=0, and constant acceleration of -32ft/sec^2 due to gravity, values of t less than zero are meaningless, and when the ball returns to s = 0 at some time in the future, its motion may cease to be described by the original function (unless it was thrown upward from a cliff or building and is allowed to fall below s=0 on its downward path-in which case it may continue and negative values of s are possible).
A realistic solution corresponding to the physical situaiton will require careful attention to the practical domain for s and the corresponding range of t.
If this is being presented as a purely mathematical exercise with no connection to a physical motion problem, then the strictly mathematical solution given by the quadratic formula is fine. It may result in complex or negative values for t in that case without causing concern.