15位提取前6位为地区编号,从第6位后6位为日期
<%
abc="342601800912461" '15位的
aaa=mid(abc,6,6)
bbb=right(abc,1)
response.write "日期为:"&mid(aaa,1,2)&"年"&mid(aaa,3,4)&"月"&mid(aaa,5,6)&"日"
if cint(bbb) mod 2=0 then
response.write "女性"
else
response.write "男性"
end if
%>
18位提取前6位为地区编号,从第6位后8位为日期
<%
abc="342601198009124617" '18位的
aaa=mid(abc,6,8)
bbb=right(abc,2)
response.write "日期为:"&mid(aaa,1,4)&"年"&mid(aaa,5,6)&"月"&mid(aaa,7,8)&"日"
if cint(left(bbb,1)) mod 2=0 then
response.write "女性"
else
response.write "男性"
end if
%>
[[it] 本帖最后由 hmhz 于 2008-4-5 18:21 编辑 [/it]]