Anas reported that the people of Makkah demanded from Allah's Messenger (ﷺ) that he should show them (some) signs (miracles) and he showed them the splitting of the moon twice.
Hadith Referenceصحيح مسلم / كتاب صفة القيامة والجنة والنار / 2802
Anas reported that the moon was split up in two parts and in the hadith recorded in Abu Dawud, the words are: "The moon was split up into two parts during the life of Allah's Messenger (ﷺ) ."
Hadith Referenceصحيح مسلم / كتاب صفة القيامة والجنة والنار / 2802
´Narrated Anas:` "The people of Makkah asked the Prophet (ﷺ) for a sign, so the moon was cleft asunder in Makkah two times (meaning two parts), so the following was revealed: 'The Hour has drawn near, and the moon has been cleft asunder, up to his saying: 'Magic, Mustamir (54:1 & 2)' meaning 'Going away.'"
Shaykh Dr. Abdur Rahman Freywai
Explanation: 1: In this hadith, the meaning of "martayn" is not that the incident of the moon splitting occurred twice. This incident did not happen twice, it happened only once. Here, "martayn" refers to "two pieces" only.
Source: Sunan al-Tirmidhi – Majlis ‘Ilmi Dar al-Da‘wah, New Delhi Edition, Page: 3286