Inclusion Criteria:  Age >= 18 years old  Type 2 diabetes (per investigator assessment); or if not previously diagnosed as having diabetes, HbA1c>=7.0% (laboratory-measured at or since hospital admission or within prior 3-months).  • Type 1 diabetes, atypical forms of diabetes (including pancreatectomy and pancreatitis) and stress hyperglycemia alone are not eligible.  At least 1 blood glucose measurement >180 mg/dL since admission Insulin already initiated since admission or planned to be initiated Non-critical hospitalization with expected length of stay on non-ICU floor >3 days at time of randomization  Exclusion Criteria:  Inability to provide written consent  Admission to ICU  • Patients transferred from ICU with an expected length of stay >3 days on a non-ICU floor are eligible  Treatment with systemic immunosuppressive agents such as high dose (>7.5 mg/day Prednisone equivalent) steroids or biologics at time of enrollment or planned treatment prior to randomization Suspected or confirmed acute myocardial infarction or stroke as reason for hospital admission or since admission Considered unlikely to survive hospitalization per investigator's judgment Diabetic ketoacidosis (DKA) or hyperosmolar hyperglycemic state (HHS) in the 6 months prior to hospital admission, at hospital admission or prior to randomization during the current hospital admission One or more severe hypoglycemic events within the 6 months prior to hospital admission or prior to randomization during the current admission  For females, pregnant or breastfeeding  • A negative serum or urine pregnancy test will be required for all females of child-bearing potential.  CGM other than study CGM being used during hospitalization or planned to be used Blood glucose >400 mg/dL at time of potential enrollment (most recent blood glucose measurement in hospital) Insulin pump being used to deliver insulin during hospitalization or planned to be used Use of IV insulin at time of potential enrollment Hypoxia (O2 saturation <90) present at time of potential enrollment Anasarca present at time of potential enrollment Use of hydroxyurea or high dose acetaminophen use of >4g daily eGFR <20 mL/min or dialysis being received or planned ALT >3X normal or current diagnosis of cirrhosis Cystic fibrosis  Expected need for surgery requiring general anesthesia during hospitalization  • Post-surgical enrollment is permitted  Known allergy to medical grade adhesives or a skin condition that may impact CGM performance per investigator discretion