年/月/日 时:分:秒 --> 年月日时分秒

    Public Function stringToDate(ByVal strDate As String) As String
        Dim yyyyMMdd As String = ""
        Dim hh24miss As String = ""
        Try
            yyyyMMdd = strDate.Substring(0, 4) & strDate.Substring(5, 2) & strDate.Substring(8, 2)
            hh24miss = strDate.Substring(11, 2) & strDate.Substring(14, 2) & strDate.Substring(17, 2)
        Catch ex As Exception
            yyyyMMdd = ""
            hh24miss = ""
        End Try
        Return yyyyMMdd & hh24miss
    End Function
 

你可能感兴趣的:(年/月/日 时:分:秒 --> 年月日时分秒)