The purpose of this study is to test whether a combination of two pills commonly used to treat outpatient diabetes called metformin and sitagliptin (januvia) could provide successful control of blood sugar levels in patients with type 2 diabetes during hospitalization for the treatment of a general medical condition. Both metformin and sitagliptin are currently approved by the Food and Drug Administration for the treatment of type 2 diabetes, but little experience exists for their use in hospitalized patients. The current standard practice is to use insulin injections to control blood sugar in hospitalized patients with type 2 diabetes. This study will compare the use of metformin tablets twice per day along with sitagliptin tablets once per day with daily insulin injections in patients with type 2 diabetes during hospitalization, and will study how well the blood sugar levels are controlled.