Step 1: A hospital-acquired (nosocomial) infection is one that was neither present nor incubating at the time of admission.
Step 2: By the standard definition, an infection is called nosocomial when it appears more than 48 hours after admission, or within 3 days of discharge, or within 30 days of an operation.
Step 3: The 48-hour cut-off separates community-acquired infection (present or incubating on arrival) from one truly picked up in the facility. Common examples are ventilator-associated pneumonia, MRSA, catheter-associated UTI and C. difficile colitis.
So the answer is 48 hours.
Ref: Park Textbook of Preventive and Social Medicine; NCBI Bookshelf NBK441857.