这给了我一个错误-
将 char 数据类型转换为 datetime 数据类型会导致 datetime 值超出范围。
这不起作用并且也尝试过,但是这个订单按日期而不是月份
SqlCommand cmd = new SqlCommand("select * from tbl_Member where Email LIKE '" + id.ToString() + "%' ORDER BY YEAR(RegisterDT) DESC,MONTH (RegisterDT) DESC, DAY(RegisterDT) DESC", con);
SqlCommand cmd = new SqlCommand("select * from tbl_Member where Email LIKE '" + id.ToString() + "%' ORDER BY(RegisterDT) DESC", con)