All patients with type 1 or type 2 diabetes who meet study criteria will be invited to participate in the study. All patients included in the study will be followed by an advanced practice diabetes nurse for glucose management during their hospitalization. All patients included in the study will receive a CGM. Patients with type 2 diabetes will be randomized to control (blinded CGM glucose values to APN, care team and researchers) or intervention (CGM blood glucose values will be used to aid with glucose management during the hospitalization). In addition, a research only supplemental order set will be implemented for all study participants. The order set focuses on any glucose point of care test that is between 70-79 mg/dL or ≥ 250 at bedtime or before the 4 am usual care blood glucose check. The goal is to prevent hypoglycemia and hyperglycemia for all study patients. The advanced practice diabetes nurse will work with the physician in charge of the patient's care as well as the patient's care team.