一个将15的身份证号升为18位的函数(VB)
来源:互联网 发布:证件照相机软件 编辑:程序博客网 时间:2024/05/17 07:21
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
在新旧身份证同时并存使用的情况下,最好将升位后的18位方式保存在中,下面的函数能将用户输入的15位数据转化为18位。
FunctionIDCode15to18(sCode15AsString)AsString
'* 功能:将15的身份证号升为18位(根据GB11643-1999)
'* 参数:原来的号码
'* 返回:升位后的18位号码
DimiAsInteger
DimnumAsInteger
DimcodeAsString
num=0
IDCode15to18=Left(sCode15,6)+"19"+Right(sCode15,9)
' 计算校验位
Fori=18To2Step-1
num=num+(2^(i-1)Mod11)*(Mid(IDCode15to18,19-i,1))
Nexti
num=numMod11
SelectCasenum
Case0
code="1"
Case1
code="0"
Case2
code="X"
CaseElse
code=Trim(Str(12-num))
EndSelect
IDCode15to18=IDCode15to18+code
EndFunction
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
在新旧身份证同时并存使用的情况下,最好将升位后的18位方式保存在中,下面的函数能将用户输入的15位数据转化为18位。
FunctionIDCode15to18(sCode15AsString)AsString
'* 功能:将15的身份证号升为18位(根据GB11643-1999)
'* 参数:原来的号码
'* 返回:升位后的18位号码
DimiAsInteger
DimnumAsInteger
DimcodeAsString
num=0
IDCode15to18=Left(sCode15,6)+"19"+Right(sCode15,9)
' 计算校验位
Fori=18To2Step-1
num=num+(2^(i-1)Mod11)*(Mid(IDCode15to18,19-i,1))
Nexti
num=numMod11
SelectCasenum
Case0
code="1"
Case1
code="0"
Case2
code="X"
CaseElse
code=Trim(Str(12-num))
EndSelect
IDCode15to18=IDCode15to18+code
EndFunction
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 一个将15的身份证号升为18位的函数(VB)
- 一个将15的身份证号升为18位的函数(VB)
- 将身份证号由15位转换为18位的函数
- 将身份证号由15位转换为18位的函数
- 将15的身份证号升为18位(根据GB 11643-1999)
- 将15的身份证号升为18位(根据GB 11643-1999)
- Java 将15位身份证号转化为18位返回,非15位身份证号原值返回
- 汇总15位身份证号和18位身份证号的区别
- 15位的身份证号转为18位
- Java 将18位身份证号转化为15位返回,非18位身份证号原值返回 单例
- 15位身份证号转换为18位身份证号
- 旧的身份证号吗(15位)如何转换为新的(18位)
- VB.net的身份证15位升18位函数
- 写了个15位身份证号升级为18位的SQL语句
- 写了个15位身份证号升级为18位的SQL语句
- 写了个15位身份证号升级为18位的SQL语句
- Excel中如何将15位身份证号转换为18位
- 15位身份证号转18位VB代码
- java 连接数据库
- 和的集成(1)
- 编译FFPLAYER
- junit使用
- DLL地狱及其解决方案
- 一个将15的身份证号升为18位的函数(VB)
- The Python Profilers (python性能优化工具介绍)
- 做一个可编辑的表格控件
- 《SQLStory》摘录五——关系真相
- 带秘笈的纸牌源码
- 庆祝一下.............
- 初学者指针指南
- 出售精心设计的电子商务网站(Isbuy.cn)
- 增加或修改列时的规则