获得出生日期–
convert(smalldatetime,substring(IDCard,7,8)) as newBirthday
获得年龄–
datediff(year,convert(smalldatetime,substring(IDCard,7,8)),getdate()) as newAge
其中:IDCard 表示为身份证号列
纯手工打造的独一无二的文章。
获得出生日期–
convert(smalldatetime,substring(IDCard,7,8)) as newBirthday
获得年龄–
datediff(year,convert(smalldatetime,substring(IDCard,7,8)),getdate()) as newAge
其中:IDCard 表示为身份证号列