Administrative data accumulating daily from hospitals would provide new possibilities to assess work shifts and patient care. We aimed to investigate associations of work unit level average work shift length and length of patient in-hospital stay, and to examine the role of nurse-patient-ratio, year, night work, age, work units and working hours at the work units for these estimations. The data for this study were based on combined administrative day-to-day patient and pay-roll based objective working hour data of employees of one hospital district in Finland for 2013–2019. Three patient measures were calculated: the overall length of in-hospital stay, the length of in-hospital stay before a medical procedure and the length of in-hospital stay after a medical procedure. A Generalized Linear Mixed Model (GLMM) with multivariate normal random effects was used with Penalized Quasi-Likelihood for relative risk ratios (RR) with 95% confidence intervals (CI). The results showed that compared to <8 hours work shifts, 8–10 hours work shifts were associated with an increased likelihood of overall length of in-hospital stay (RR 1.16, 95%CI 1.15, 1.16), and the length of in-hospital stay after a medical procedure (RR 1.28, 95%CI 1.27, 1.30). The >10 hours work shifts were associated with a decreased likelihood of the overall length of in-hospital stay (RR 0.94, 95% CI 0.94, 0.95) and length of in-hospital stay after a medical procedure among all occupations (RR 0.94, 95% CI 0.92, 0.97). These associations retained the magnitude and direction in the models additionally adjusted for work, employee, and patient characteristics, and the associations were weaker for nurses than among all occupations. To conclude, compared with the standard work shifts, 8–10 hours work shifts seem to be associated with longer, and >10 hours work shifts with shorter length of in-hospital stay. Administrative data provides feasible possibilities to investigate working hours and length of in-hospital stay.