根据时间的字符串形式(20031110)获得日期型

'根据时间的字符串形式(20031110)获得日期型

Function GetDateTimeByDateString( ByVal DateString As String ) As Date

Return CDate (Left(DateString, 4) & "-" & Right(Left(DateString, 6), 2) & "-" & Right(DateString, 2))

End Function

Published At
Categories with Web编程
Tagged with
comments powered by Disqus