将输入的20041219等的数字字符串等格式化成日期型

类别:.NET开发 点击:0 评论:0 推荐:
dim strin as string,strout as string
strin="20051219"
strout=left(strin,4)
strout=strout & "/" & mid(strin,5,iif(len(strin)=8,2,1))
strout=strout & "/" & right(strin,2)
strout=format(strour,"yyyy/mm/dd")
msgbox(strout)

本文地址:http://com.8s8s.com/it/it42421.htm