Public Class Tester
Public Shared Sub Main
Dim rightNow As Date = Now.ToUniversalTime
Dim format1 As String = rightNow.ToString("s")
Dim format2 As String = rightNow.ToString("u")
Dim format3 As String = rightNow.ToString("s") & "Z"
Dim format4 As String = rightNow.ToString( _
"u").Substring(0, 19)
Console.WriteLine(String.Format( _
"s: {1}{0}u: {2}{0}T&Z: {3}{0}Neither: {4}", _
vbNewLine, format1, format2, format3, format4))
End Sub
End Class
|