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-controlled, parallel-group,3-arm (3 treatment groups) multicenter study to determine the efficacy, safety, and tolerability of canagliflozin compared to placebo (a capsule that is identical in appearance to canagliflozin but does not contain active drug) in patients with type 2 diabetes mellitus (T2DM) who are not achieving an adequate response from current antihyperglycemic therapy with metformin to control their diabetes. Canagliflozin (a Sodium-Glucose Cotransporter 2 inhibitor) is currently under development to lower blood sugar levels in patients with T2DM. Patients will take single-blind placebo capsules orally (by mouth) for 2 weeks before randomization. Patients will be randomly assigned canagliflozin or matching placebo, orally, twice daily, with 1 capsule taken with the morning meal and 1 capsule taken with the evening meal (2 capsules per day) and concurrent with metformin, if applicable, for up to 18 weeks. The dosing time of metformin should remain the same throughout the study.