Crib transition

How long does it take to transition baby to crib.? Also do you suggest start at night or during naps?