+ -
当前位置:首页 → 问答吧 → 字符串格式转换成DateTiem类型(在线等)

字符串格式转换成DateTiem类型(在线等)

时间:2011-07-02

来源:互联网

我现在有20110702111934这样的字符串,“年年年年月月日日时时分分秒秒”这样的格式。
想转换成DateTime格式的。
请高手指点

作者: mardonma   发布时间: 2011-07-02

VBScript code

str="20110702111934"
datetime=mid(str,1,4)&"-"&mid(str,5,2)&"-"&mid(str,7,2)&" "&mid(str,9,2)&":"&mid(str,11,2)&":"&mid(str,13,2)
response.write(datetime)


作者: tcwsyt   发布时间: 2011-07-02

1楼可行

作者: vstudiocn   发布时间: 2011-07-02