根据身份证号码生成生日和性别
来源:互联网 发布:最新淘宝优惠券二维码 编辑:程序博客网 时间:2024/05/01 17:10
String ls_date,ls_id,ls_sex,ls_month,ls_day,ls_year
Date ld_birthday
ls_id = data
If Len(ls_id) = 15 Then
ls_date = Mid(ls_id,7,6)
ls_sex = MID(ls_id,15,1)
ls_year = Mid(ls_id,7,2)
ls_month = Mid(ls_id,9,2)
ls_day =Mid(ls_id,11,2)
ls_year = '19' + ls_year
ElseIf Len(ls_id) = 18 Then
ls_date = Mid(ls_id,7,8)
ls_sex = Mid(ls_id,17,1)
ls_year = Mid(ls_id,7,4)
ls_month = Mid(ls_id,11,2)
ls_day =Mid(ls_id,13,2)
Else
MessageBox("错误","身份证号码只能为15位或18位,请重新输入!^_^' ")
return 2
End If
if not (((Integer(ls_year))>=1900) and ((Integer(ls_year))<=2999)) then
messagebox('提示:','对不起,你输入的身份证号码年份不对,请检查')
return 2
end if
if not (((Integer(ls_month))>=01) and ((integer(ls_month))<=12)) then
messagebox('提示:','对不起,你输入的身份证号码月份不对,请检查')
return 2
end if
if not (((Integer(ls_day))>=01) and ((Integer(ls_day))<=31)) then
messagebox('提示:','对不起,你输入的日期份证号码不对,请检查')
return 2
end if
ls_date = Left(ls_date, Len(ls_date) - 4)+"-"+Mid(ls_date,Len(ls_date)-4+1,2)+ "-" + Right(ls_date,2)
ld_birthday = Date(ls_date)
if Mod(integer(ls_sex),2)=0 then
ls_sex = '女'
else
ls_sex = '男'
end if
Date ld_birthday
ls_id = data
If Len(ls_id) = 15 Then
ls_date = Mid(ls_id,7,6)
ls_sex = MID(ls_id,15,1)
ls_year = Mid(ls_id,7,2)
ls_month = Mid(ls_id,9,2)
ls_day =Mid(ls_id,11,2)
ls_year = '19' + ls_year
ElseIf Len(ls_id) = 18 Then
ls_date = Mid(ls_id,7,8)
ls_sex = Mid(ls_id,17,1)
ls_year = Mid(ls_id,7,4)
ls_month = Mid(ls_id,11,2)
ls_day =Mid(ls_id,13,2)
Else
MessageBox("错误","身份证号码只能为15位或18位,请重新输入!^_^' ")
return 2
End If
if not (((Integer(ls_year))>=1900) and ((Integer(ls_year))<=2999)) then
messagebox('提示:','对不起,你输入的身份证号码年份不对,请检查')
return 2
end if
if not (((Integer(ls_month))>=01) and ((integer(ls_month))<=12)) then
messagebox('提示:','对不起,你输入的身份证号码月份不对,请检查')
return 2
end if
if not (((Integer(ls_day))>=01) and ((Integer(ls_day))<=31)) then
messagebox('提示:','对不起,你输入的日期份证号码不对,请检查')
return 2
end if
ls_date = Left(ls_date, Len(ls_date) - 4)+"-"+Mid(ls_date,Len(ls_date)-4+1,2)+ "-" + Right(ls_date,2)
ld_birthday = Date(ls_date)
if Mod(integer(ls_sex),2)=0 then
ls_sex = '女'
else
ls_sex = '男'
end if
- 根据身份证号码生成生日和性别
- 根据身份证号码生成生日和性别
- 根据身份证号码生成生日和性别
- IOS 根据身份证号码获取 年龄 生日 性别
- javascript 根据身份证号码取得生日与性别
- 由身份证号码取生日和性别
- 根据身份证号码识别性别年龄生日的JS代码:
- js实现根据身份证号码识别 性别 年龄 生日
- 身份证号码的验证&根据身份证号码获取出生日期和性别
- 根据身份证判断性别和生日
- 根据用户身份证号计算性别和生日
- 15位, 18位的身份证号码的验证函数.以及根据身份证取省份,生日,性别
- ahjesus根据身份证号码获取相关信息(生日,省市县,性别)
- C#中如何根据身份证号码得到出生日期和性别
- 单元格里根据身份证号码计算年龄和性别
- PHP根据身份证号码验证、获取星座、生肖和性别函数
- php 根据身份证号码验证、获取星座、生肖和性别函数
- PHP根据身份证号码验证、获取星座、生肖和性别函数
- 2011年10月11日晚,履行答应她的承诺。我打电话给妈妈,,哭了,从未如此痛彻心扉地哭过,在母亲的面前。
- 微软最近对外发布了必应翻译应用开发接口(API),Facebook成为第一批尝鲜者
- Problems for Beginners
- 您是真正的创业者吗?
- 1B数值转换为26进制
- 根据身份证号码生成生日和性别
- Linux Kernel源代码分析中的终极问题
- 《营销管理》-第7章-识别市场细分和目标市场
- 容器与元素应分别设计
- jQuery 参考手册1-jQuery 选择器
- 在 PHP 中使用命令行工具
- 感谢乔布斯-没有他,这个世界会不同
- 虚拟键码对照表与ASCII对照表的整理
- dd命令详解