where.AppendFormat(" and SUBSTRING(idCardNo,7,4)={0} ", System.DateTime.Now.Year - Convert.ToInt32(s.Substring(3).Trim()));
sql 知道年龄 数据库里面只有身份证 查询条件为这个年龄的所有数据
原文:http://www.cnblogs.com/haihang/p/3524009.html