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

作者:linfengxia

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)

posted on 2006-04-15 08:34  银狐  阅读(406)  评论(0编辑  收藏  举报