In hospitals, 15%-20% of patients have diabetes. Therefore, all healthcare professionals (HCPs) must have a basic knowledge of in-hospital diabetes management. This survey assessed the knowledge of diabetes among HCPs in Denmark. A 27-item questionnaire was developed and reviewed independently before the survey was distributed. The questionnaire contained seven baseline questions on the HCPs' current workplace, educational level, usual shift routines and years of experience, 18 multiple-choice questions and 2 cases. A total of 252 completed questionnaires were returned by 133 (52.8%) physicians, 101 (40.1%) nurses and 18 (7.1%) healthcare assistants. HCPs answered 50% of the questions correctly. Having experience from endocrinological departments increased the correct response score (0%-100%) by 6.2% points (95% CI 0.3-12.1) (p = 0.039) and 3.1% points (95% CI 1.5-4.7) for every increase in confidence level on a scale from 1 to 10 (p < 0.001). HCPs scored 8 out of 10 on a confidence level scale on average. In a fictive case, 50% of HCPs administered the correct bolus insulin dose. Hyperglycaemia (>10.0 mmol/L) and hypoglycaemia (<3.9 mmol/L) were correctly identified by around 40% of HCPs. Hypoglycaemia was rated more important than hyperglycaemia by most HCPs. Significant gaps in identifying hypo- and hyperglycaemia and correct administration of bolus insulin have been identified, which could be targeted in future education for HCPs. HCPs answered 50% of questions related to in-hospital diabetes management correctly. Experience from endocrinological departments and self-rated confidence levels are associated with HCPs' in-hospital diabetes competencies.