Public Class Tester
Public Shared Sub Main
Dim rightNow As Date = Now
Dim result As New System.Text.StringBuilder
result.AppendLine("""Now""...")
result.Append("ToString: ").AppendLine(rightNow.ToString)
result.Append("ToLongDateString: ")
result.AppendLine(rightNow.ToLongDateString)
result.Append("ToShortDateString: ")
result.AppendLine(rightNow.ToShortDateString)
result.Append("ToLongTimeString: ")
result.AppendLine(rightNow.ToLongTimeString)
result.Append("ToShortTimeString: ")
result.AppendLine(rightNow.ToShortTimeString)
result.Append("ToUniversalTime: ")
result.AppendLine(rightNow.ToUniversalTime)
result.AppendLine()
Console.WriteLine(result.ToString)
End Sub
End Class
|