Background: Accurate documentation of social determinants of health (SDoH) in electronic health records (EHRs) is critical for developing equitable AI models for diabetes management. This study investigates SDoH data in a cross-institutional EHR database. Methods: We analyzed neighborhood-level (i.e., social vulnerability index [SVI], Rural-Urban Community Area [RUCA]) and individual-level SDoH (e.g., preferred language, marital status, tobacco, alcohol, and substance use) within the Epic Cosmos database, focusing on adults diagnosed with T2D (E11.*) who had encounters between 2021 and 2023. We measured data completeness (i.e., the proportion of individuals who have a non-missing value) and the prevalence of non-canonical values (e.g., preference for language other than English) for each available SDoH variable. Findings: The study included 12,696,680 individuals with T2D. SVI, RUCA and preferred language were available for all individuals, while marital status, and smoking data were available for over 90%. However, financial needs, interpersonal violence, social activity, and physical activity were present in EHRs for 7.6%-24.6% of the population depending on race/ethnicity. Minority groups experienced lower data completeness and higher burden of non-canonical values compared to White individuals. Interpretation: Neighborhood-level and some individual-level SDoH have potential for use in AI development and evaluation. Other SDoH data cannot be used without additional analysis to address high amounts of missing data. Significant disparities in completeness exist across racial/ethnic groups. Addressing these data gaps may require government and payer mandates, standardized SDoH screening tools, and personnel training.