there is no neccesity to learn a piece in a day,
in fact if you do that, you will probably get tired of the piece within a short amount of time
On the contrary - I've had to do this quite a bit, particularly for chamber music and other collaborative rep given to me either on short notice, or when other music takes priority in my sessions. As far as solo material goes, my childhood teacher had to do this regularly - Fleisher would give him his encores the night before the performance.