'根据身份证获取出生年月日 Function GetBirthday(str) Dim dt if len(str) = 15 then '注意:需要区分2000年出生的、2000年后出生的 dt = DateSerial("19" & Mid(str,7,2),Mid(str,9,2),Mid(str,11,2)) elseif len(str) = 18 then dt = DateSerial(Mid(str,7,4), Mid(str, 11, 2), Mid(str, 13, 2)) else dt = CDate("1900-01-01") end if GetBirthday = dt End Function
①
欢迎转载我网所刊信息,请注明“来源:E天下网络”。
② 凡本网注明“来源:XXX(非E天下网络)”的作品,均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如因作品内容、版权和其它问题需要同本网联系的,请在30日内进行。
※联系方式:Airtofly@163.com