(Al Jinn) 72 : 25
قُلْ إِنْ أَدْرِي أَقَرِيبٌ مَا تُوعَدُونَ أَمْ يَجْعَلُ لَهُ رَبِّي أَمَدًا

You say: I don’t know whether what is promised to you will be happening shortly, or whether my Lord has made it distant.

That means Messenger didn’t know that the time of Day of Judgement is near or far. See explanation 7: 187; and 41: 47.