Convert Date to String
Imports System.Globalization
Module Example
Public Sub Main()
Dim dat As Date = #3/1/2011#
Dim cultures() As CultureInfo = { CultureInfo.InvariantCulture,
New CultureInfo("en-US"),
New CultureInfo("fr-FR") }
For Each culture In cultures
Console.WriteLine("{0,-12} {1}", If(String.IsNullOrEmpty(culture.Name),
"Invariant", culture.Name),
dat.ToString("d", culture))
Next
End Sub
End Module
Related examples in the same category