When are congenital diaphragmatic hernias typically detected?

Prenatally. Many infants are diagnosed by prenatal ultrasound. In some instances mothers are given options. Fetal surgical options have gone by the wayside as there is no perfect prenatal fix.
Depends. The worst occur prenatally & intestines occupy lung space, often preventing adequate lung development that could be fatal. Ultrasound will usually detect this if it is looked at for more than just head size/position. Some of these aren't symptomatic until birth, when air swallowing inflates the gut & the gut pushes into a smaller defect in the breathing muscle. Found on x-ray/rapid breathing.
Early Infancy. Most are detected in very early infancy or prenatally. The use of routine prenatal ultrasound has dramatically increased the likelihood of detecting most congenital diaphragmatic hernias prenatally. If not detected prenatally, most hernias are symptomatic and create the need for imaging which detects the problem very early in life. Rarely, small hernias can persist undetected into adulthood.