Public Class Tester
Public Shared Sub Main
Dim rightNow As Date = Now
Dim weekDay As Integer = rightNow.DayOfWeek
Dim weekDayShort As String = Format(rightNow, "ddd")
Dim weekDayLong As String = String.Format("{0:dddd}", rightNow)
Dim results As String = String.Format( _
"Today's day of the week: {0}, or {1}, or {2}", _
weekDay, weekDayShort, weekDayLong)
Console.WriteLine(results)
End Sub
End Class
|