The last standard gauge class 1 regular service steam engine served in October of 1962. If 37 years can be considered overnight, I guess I'll agree.
It was not the purchase of diesel over 37 years it was the abandonment of the service stops of the steam train. The plug was pulled on the service stops overnight. Hence the railroads had equipment in good running condition that they could not use. And it was done virtually overnight. At the time of rapidly declining revenue the railroads needed to replace perfectly good equipment with very expensive new equipment. Most railroads made the switch in 1955 with a few lines hanging on into the 1960’s. It was a cost saving for the future but at the time it was a huge expenditure. Railroads had a few diesel engines before WWII but they were mostly running steam. Railroads did not start buying diesel engines in mass until after WWII. So within 10 years they had completely converted power.