年月日转换成大写
ASP 2008/12/4 11:03:08 点击:不统计
关键词:数字转换成大写,年月日转换成大写
function strtxt(s)
if len(s)=4 then
s=char(s)
elseif len(s)=2 then
if mid(s,1,1)<>"1" then
s=char(mid(s,1,1))&"十"&char(mid(s,2,1))
else
s="十"&char(mid(s,2,1))
end if
else
s=char(s)
end if
strtxt=s
end function
function char(s)
s = Replace(s,"0", "○")
s = Replace(s,"1", "一")
s = Replace(s,"2", "二")
s = Replace(s,"3", "三")
s = Replace(s,"4", "四")
s = Replace(s,"5", "五")
s = Replace(s,"6", "六")
s = Replace(s,"7", "七")
s = Replace(s,"8", "八")
s = Replace(s,"9", "九")
char=s
end function
response.Write "1982"&strtxt("1982")
response.Write "<br>12月"&strtxt("12")
response.Write "<br>6日"&strtxt("6")
response.Write "<br>其它77"&strtxt("77")
·上一篇:asp遍历文件 >> ·下一篇:文件夹路径 >>