The Messenger of Allah ﷺ said, "Whoever seeks it should seek it on the twenty-seventh night." He also said, "Seek it on the twenty-seventh night," meaning Laylat al-Qadr.
حدثنا يزيد بن هارون أخبرنا شعبة عن عبد الله بن دينار
قال رسول الله ﷺ من كان متحريها فليتحرها ليلة سبع وعشرين وقال تحروها ليلة سبع وعشرين يعني ليلة القدر
Its isnad is sahih. It is found in Majma al-Zawaid 3:176, where he said, Ahmad narrated it and its narrators are the narrators of the Sahih. Likewise it is in Muntaqa 2293, where he said, Ahmad narrated it with a sahih isnad. In H and K here, and in Majma al-Zawaid, it reads "and he said, seek it," and so on, while in the printed Muntaqa and in the correct manuscript of it that I have, it reads "or he said." See also 4499, 4547, 4671, 6474.