Language:
كتاب العيدين
13  
The Two Festivals (Eids)
(15)
Chapter: The coming out of the ladies and menstruating women to the Masjid
(15)
باب خُرُوجِ النِّسَاءِ وَالْحُيَّضِ إِلَى الْمُصَلَّى
Sahih al-Bukhari 974

Narrated Muhammad:

Um 'Atiyya said: "Our Prophet ordered us to come out (on `Id day) with the mature girls and the virgins staying in seclusion." Hafsa narrated the above mentioned Hadith and added, "The mature girls or virgins staying in seclusion but the menstruating women had to keep away from the Musalla."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ عَبْدِ الْوَهَّابِ، قَالَ حَدَّثَنَا حَمَّادٌ، عَنْ أَيُّوبَ، عَنْ مُحَمَّدٍ، عَنْ أُمِّ عَطِيَّةَ، قَالَتْ أُمِرْنَا أَنْ نُخْرِجَ، الْعَوَاتِقَ وَذَوَاتِ الْخُدُورِ‏.‏ وَعَنْ أَيُّوبَ عَنْ حَفْصَةَ بِنَحْوِهِ‏.‏ وَزَادَ فِي حَدِيثِ حَفْصَةَ قَالَ أَوْ قَالَتِ الْعَوَاتِقَ وَذَوَاتِ الْخُدُورِ، وَيَعْتَزِلْنَ الْحُيَّضُ الْمُصَلَّى‏.‏
Reference : Sahih al-Bukhari 974
In-book reference : Book 13, Hadith 23
USC-MSA web (English) reference : Vol. 2, Book 15, Hadith 91
  (deprecated numbering scheme)