我有一个带有 LinqtoSQL 数据源的 GridView。我在代码中绑定它。这是代码
DataClassesDataContext dContext = new DataClassesDataContext();
var userId = (Guid)(Membership.GetUser(Membership.GetUser().UserName, false).ProviderUserKey);
var Query = from d in dContext.table1
where d.UserId == userId
select new { d.date, d.weight, d.height, d.BMI };
gv.DataSource = Query;
gv.DataBind();
d.date 是 DateTime 列我喜欢只显示日期如何格式化它?谢谢