Parse Date: 2007-07-04T23:59:59 : Date Parse « Date Time « VB.Net Tutorial






Public Class Tester
    Public Shared Sub Main
        Dim testDate As String
        Dim results As New System.Text.StringBuilder

        ' ----- Test a standardized date and time.
        testDate = "2007-07-04T23:59:59"
        If (IsDate(testDate) = True) Then _
           results.AppendLine(Date.Parse(testDate).ToString)

        Console.WriteLine(results.ToString())

    End Sub

End Class
04/07/2007 11:59:59 PM








5.4.Date Parse
5.4.1.Parse Date
5.4.2.Parse Date: Feb 3, 2007
5.4.3.Parse Date: 23:57:58
5.4.4.Parse Date: December 7, 2007
5.4.5.Parse Date: 2007-07-04T23:59:59
5.4.6.Parse Date: 2007-07-04T23:59:59Z
5.4.7.Use Parse method to convert a string into a DateTime