Imports System.Globalization
Imports System.Threading
Module Example
Public Sub Main()
Dim dateToDisplay As Date = #06/01/2009 8:42:50#
Dim originalCulture As CultureInfo = Thread.CurrentThread.CurrentCulture
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
Console.WriteLine(Thread.CurrentThread.CurrentCulture.Name)
Console.WriteLine(dateToDisplay.ToShortDateString())
Console.WriteLine(dateToDisplay.ToString("d"))
Thread.CurrentThread.CurrentCulture = New CultureInfo("fr-FR")
Console.WriteLine("Displaying short date for {0} culture:",Thread.CurrentThread.CurrentCulture.Name)
Console.WriteLine(" {0}", dateToDisplay.ToShortDateString())
Thread.CurrentThread.CurrentCulture = originalCulture
End Sub
End Module