This asteroid was several miles across, and hopefully in the next 10 years we will have identified most of these objects that have orbits that cross the Earth's. In principle, one could then make forecasts that would be reasonably accurate for a few months at a time given all of the gravitational perturbations that can occur between such bodies and the other objects in the solar system. If we did not know the existence of the asteroid prior to impact, we might only have a weeks notice or less, depending on its trajectory. The problem is that during the days and weeks just before impact, such an object would be moving almost directly towards the Earth and not have much of a motion across the sky. This would make identifying them on the basis of rapid motion in the sky, very difficult. All we might see would be its increase in brightness from a star-like object. If it happened to be in or near the plane of the Milky Way, it would easily get confused with background stars in such a nightly search. At 30 kilometers/sec, buy the time it got to the orbital distance of the Moon, deep space radars might detect the object, which would only be about 10,000 seconds or less than 34 hours from impact.
Have a nice day.