Canagliflozin is a drug that is being tested to see if it may be useful in treating patients diagnosed with type 2 diabetes mellitus (T2DM). This is a randomized (study drug assigned by chance), double-blind (neither the patient nor the study doctor will know the identity of assigned study drug), placebo- and active-controlled, parallel-group, 4-arm (4 treatment groups) multicenter study to determine the efficacy, safety, and tolerability of canagliflozin (100 mg and 300 mg) compared to placebo (a capsule that looks like all the other treatments but has no real medicine) and an active-control (sitagliptin 100 mg, an antihyperglycemic agent) in patients with T2DM who are not achieving an adequate response from current antihyperglycemic therapy with metformin Immediate Release (IR) to control their diabetes. Approximately 1,260 patients with T2DM who are receiving treatment with metformin IR and have inadequate glycemic (blood sugar) will receive once-daily treatment with canagliflozin (100 mg or 300 mg), sitagliptin 100 mg, or placebo capsules for 26 weeks (Period I) followed by another 26-weeks where patients treated with canagliflozin (100 mg or 300 mg) or sitagliptin 100 mg will continue treatment for an additional 26 weeks and patients treated with placebo will be switched to active double-blind treatment with sitagliptin 100 mg capsules administered once-daily for 26 weeks (Period II). In addition, all patients will take protocol specified stable doses of metformin IR along with assigned study drug for the duration of the study. Patients will participate in the study for approximately 59 to 71 weeks. During the study, if a patient's fasting blood sugar remains high despite treatment with study drug, metformin IR, and reinforcement with diet and exercise, the patient will receive treatment with glimepiride (rescue therapy) consistent with local prescribing information. During treatment, patients will be monitored for safety by review of adverse events, results from laboratory tests, 12-lead electrocardiograms (ECGs), vital sign measurements, body weight, physical examinations, and self-monitored blood glucose (SMGB) measurements. The primary outcome measure in the study is to assess the effect of canagliflozin relative to placebo on hemoglobin A1c (HbA1c) after 26 weeks of treatment. Study drug will be taken orally (by mouth) once daily before the first meal each day unless otherwise specified. Patients will take single-blind placebo for 2 weeks before randomization. After randomization, patients in the study will take double-blind canagliflozin (100 mg or 300 mg) or sitagliptin 100 mg for 52 weeks OR placebo for 26 weeks switched to double-blind treatment with sitaliptin 100 mg for 26 weeks.