首页 | 文摘 | 我的收藏 | 小言视角 | 学无止境 | 我爱我家 | 技术中心 |
当前位置:语深深的世界>>我的收藏>>经典脚本>>正文
日期转大写的代码

发布时间:2006-04-22

日期转大写的代码:
2004-6-11 => 二零零四年六月十一日

代码如下:

'2004-6-11 => 二零零四年六月十一日
Function D(x)
 if int(split(x,"-")(2)/10)=0 then D=D & F(split(x,"-")(2)) else _
 if split(x,"-")(2) mod 10 =0 then D=D & F(int(split(x,"-")(2)/10)) & "十" else _
 D=D & F(int(split(x,"-")(2)/10)) & "十" & F(split(x,"-")(2) mod 10)
 D=F(split(x,"-")(0)) & "年" & MonthName(split(x,"-")(1),True) & replace(D,"一十","十") & "日"
end Function

Function F(x)
 for i=1 to len(x)
  if mid(x,i,1)="0" then F=F & "零" else F=F & left(MonthName(mid(x,i,1),True),1)
 next
end Function

msgbox D(Date)


出处:51windows.net
相关信息

·PowerPoint文件转图像脚本(ppt2img)
·HTML2JS转换脚本
·exe2swf 工具(Adodb.Stream版)
·VBS相册生成脚本

首页 | 语深深的世界>>我的收藏>>经典脚本>>
语深深版权所有 2005-2008