我收到错误消息:“字符串未被识别为有效的数据时间”
SqlDataAdapter DataAp = new SqlDataAdapter(createCommand);
DataTable dt = new DataTable("User");
var user = new User();
TimeSpan timeSpanDays = DateTime.Now.Subtract(DateTime.Parse(user.RegistrationTime.ToString()));
var days = timeSpanDays.Days;
if (days < 10)
{
DataAp.Fill(dt);
dgRecent.ItemsSource = dt.DefaultView;
DataAp.Update(dt);
}