Qabisah bin Dhu'ayb narrates from Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) that he gave a ruling concerning a man who denied his wife's pregnancy, then acknowledged it, and when the child was born he denied it (again). Sayyiduna Umar (may Allah be pleased with him) had him given the prescribed punishment for slander, eighty lashes, and then attributed the child to the husband as well.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللعان / 15367
Qadi Shurayh narrates from Sayyiduna Umar (may Allah be pleased with him) that when a man acknowledges his child even for the blink of an eye, it is not proper for him to deny him after that.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللعان / 15368