Display the long time pattern and string
Imports System
Imports System.Threading
Imports System.Globalization
Class Sample
Public Shared Sub Main()
Dim myDateTime As New DateTime(2011, 5, 16, 3, 2, 15)
Dim ci As CultureInfo = Thread.CurrentThread.CurrentCulture
Console.WriteLine("Long time pattern: ""{0}""", ci.DateTimeFormat.LongTimePattern)
Console.WriteLine("Long time string: ""{0}" & vbCrLf, myDateTime.ToLongTimeString())
End Sub
End Class
Related examples in the same category