Abstract Introduction Type 2 diabetes (T2D) is a common comorbidity in heart failure (HF), and long-standing T2D is associated with worse outcomes. Purpose To investigate the efficacy and safety of dapagliflozin, compared with placebo, according to duration of T2D in patients with HF and established T2D. Methods We conducted a patient-level pooled analysis of the DAPA-HF and DELIVER trials, which evaluated the effects of dapagliflozin, compared with placebo, in patients with HF with reduced ejection fraction and HF with mildly reduced/preserved ejection fraction, respectively. T2D duration was categorized as <5 years, 6-10 years, and >11 years. The primary outcome was a composite of worsening HF or cardiovascular death. Results Of the 4,784 patients with a history of T2D, 1,879 (39.3%) had a T2D duration of <5 years, 1,074 (22.4%) 5-10 years, and 1,831 (38.3%) >11 years. Patients with longer-duration T2D were older, more often female, and White, and had a higher HbA1c, body mass index, and left ventricular ejection fraction. They were more likely to have ischaemic heart disease, peripheral artery disease, hypertension, and chronic kidney disease, but were less likely to have atrial fibrillation/flutter. Although patients with longer-duration T2D had longer duration of HF, they were not more likely to have a prior HF hospitalization or worse New York Heart Association functional class. Despite similar N-terminal pro-B-type natriuretic peptide levels, patients with longer-duration T2D had a higher risk of the primary outcome, even after adjustment for potential confounders (<5 years, reference; 6-10 years, HR 1.25 [95% CI, 1.06-1.46]; >11 years, HR 1.33 [1.15-1.54]). The benefit of dapagliflozin on the primary outcome was consistent across T2D duration category: <5 years, HR 0.85 (95% CI, 0.69-1.04); 5-10 years, HR 0.65 (0.51-0.83); >11 years, HR 0.84 (0.70-1.01) (Pinteraction=0.18). Dapagliflozin reduced the risk of secondary clinical outcomes and increased (improved) mean KCCQ scores from baseline to 8 months, regardless of T2D duration (Table). Adverse events and treatment discontinuation were not more frequent with dapagliflozin than with placebo irrespective of T2D duration. Conclusions Dapagliflozin reduced the risk of worsening HF or cardiovascular death, and improved symptoms, in patients with HF and T2D, irrespective of T2D duration.