Perhaps you are thinking of Revelation 12:12 – “Therefore rejoice, you heavens and you who dwell in them! But woe to the earth and the sea, because the devil has gone down to you! He is filled with fury, because he knows that his time is short.”
Satan does not know when the Last Day will be (Matthew 24:36). He simply knows that there is an end to his activity on earth, and the end is approaching.