Hospital-acquired bloodstream infections have a definite impact on patient encounters and cause increased length of stay, costs, and mortality. However, methods for estimating these effects are potentially biased, especially if the time of infection is not incorporated into the estimation strategy. We focused on matching patient encounters in which a hospital-acquired infection occurred to comparable encounters in which an infection did not occur. This matching strategy is susceptible to a selection bias because inpatients that stay longer in the hospital are more likely to acquire an infection and thus also are more likely to have longer and more costly stays. Instead, we have proposed risk-set matching, which matches infected encounters to similar encounters still at risk for infection at the corresponding time of infection. Matching on the one-dimensional propensity score can create comparable pairs for a large number of characteristics; an analogous propensity score is described for risk-set matching. We have presented dramatically different estimates using these 2 approaches with data from a pediatric cohort from the Premier Healthcare Database, United States, 2009-2016. The results suggest that estimates that did not incorporate time of infection exaggerated the impact of hospital-acquired infections with regard to attributed length of stay and costs.