Approximately 420 subjects with inadequately controlled T2DM on metformin will be recruited from North America and Europe. Subjects will be randomly assigned to receive bexagliflozin tablets, 20 mg, or glimepiride capsules, 2, 4 or 6 mg, in a ratio of 1:1 once daily for 96 weeks. Subjects will continue to take metformin for the duration of the study.