In the illustration here I've added an Xtra feature to try and get the most general case.
Shown us a little rocket motor, let's say the object (we want to characterize) is attached to a rocket motor, before the free-fall phase of downward motion (now considered as a positive direction just to simplify, as ianb has suggested).
The reason I'm doing this is to get a general equation, rather than just the '1/2 AT squared' term. Either we could have the rocket motor accelerate, say at 5 newtons per second per second, or just have it give a push at the beginning (looks better).
That way you've got all the terms expressed
But actually, the simple equation can still work, even in some cases that seem complicated.
Consider the illustration below. Someone fires a stone from a catapult up onto the roof of a building. If the launch velocity of the stone is 10 m/s, at an angle of 80°, starting 1 m above the ground, and if the building is 4 m high, how long does it take before the stone lands on the roof? Assume that air resistance can be neglected.
To work the solution, we can use the equation derived earlier:
$$s=ut+\textstyle{\frac12} at^2$$
To work out the time of rise and fall, we only need to consider the vertical component of velocity, acceleration and distance, and we can ignore the horizontal component. So first of all, we can find the vertical component of the initial velocity. This is found with trigonometry:
$$u_y=u\sin(80^{\circ})=(10)(0.985)=9.85\,\mathrm{m/s}$$
Secondly, we have the total distance traveled:
$$s_y=4-1=3\,\textrm{m}$$
Since we are using up for the positive direction, then the acceleration due to gravity is negative:
$$a_y=-g=-9.81\,\textrm{m/s}^2$$
Now we can plug the numbers into the formula:
$$s_y=u_y t+\textstyle{\frac12} a_y t^2$$ $$3=(9.85)t+\textstyle{\frac12}(-9.81)t^2$$
This is a quadratic equation we can solve for \$t\$. We get two solutions:
$$t=0.37\,\textrm{s}\;\;\textrm{or}\;\;t=1.63\,\textrm{s}$$
The first time will be on the way up, and the second time will be on the way down. So the answer we are looking for is the second one, and the time to land on the roof is
1.63 s.