ASP阿拉伯数字转中文数字
2007-12-22 15:57
162 查看
################################
函数名:阿拉伯数字转中文数字函数
################################
function chnumstr(num)
num=int(abs(num))
strlen=len(num)
for i=1 to strlen
select case mid(num,i,1)
case 1:chnum="一":case 2:chnum="二":case 3:chnum="三"
case 4:chnum="四":case 5:chnum="五"
case 6:chnum="六":case 7:chnum="七":case 8:chnum="八"
case 9:chnum="九":case 0:chnum="零"
end select
chnumstr=chnumstr&chnum
if i=strlen-1 and mid(num,i,1)<>0 then chnumstr=chnumstr&"十"
if i=strlen-2 and mid(num,i,1)<>0 then chnumstr=chnumstr&"百"
if i=strlen-3 and mid(num,i,1)<>0 then chnumstr=chnumstr&"千"
if i=strlen-4 and mid(num,i,1)<>0 then chnumstr=chnumstr&"万"
if i=strlen-5 and mid(num,i,1)<>0 then chnumstr=chnumstr&"十"
if i=strlen-6 and mid(num,i,1)<>0 then chnumstr=chnumstr&"百"
if i=strlen-7 and mid(num,i,1)<>0 then chnumstr=chnumstr&"千"
if i=strlen-8 and mid(num,i,1)<>0 then chnumstr=chnumstr&"万"
next
if left(chnumstr,1)="一" then chnumstr=right(chnumstr,len(chnumstr)-1)
if right(chnumstr,1)="零" then chnumstr=left(chnumstr,len(chnumstr)-1)
end function
相关文章推荐
- 将阿拉伯数字日期转换为中文数字日期格式(ASP)
- C#实现阿拉伯数字(小写金额)到大写中文(大写金额)的转换
- 一个将阿拉伯数字转换成中文大写的最简单算法
- 阿拉伯数字跟中文汉字互转js
- js阿拉伯数字转中文大写 方法重多
- 如何把阿拉伯数字转换为中文大写?
- JAVA将阿拉伯数字转换为中文
- C#实现阿拉伯数字(小写金额)到大写中文(大写金额)的转换
- 一个将阿拉伯数字转换成中文大写的好算法(C#)
- [经典]将阿拉伯数字转成中文数字字串和将中文字串转成拉伯数字
- 阿拉伯数字金额转换为中文大写之存储过程(更新版)
- 将中文数字转换成阿拉伯数字
- python 中文汉字钱转成阿拉伯数字钱
- 金额转换:阿拉伯数字转中文(SQL存储过程)
- 一个将阿拉伯数字转换成中文大写的好算法【原创】(C#)
- python3 将中文句子中汉字数字转阿拉伯数字
- 2012向全国人民拜年了!!![阿拉伯数字转中文大写-金额]
- Javascript阿拉伯数字转中文
- android 金额输入验证(阿拉伯数字转换中文大写)
- 阿拉伯数字转中文