Mega Code Archive

 
Categories / VB.Net Tutorial / Date Time
 

Defines a custom format string that displays the day of the week in parentheses after the month name, day, and year

Public Module Example    Public Sub Main()         Dim customFormat As String = "MMMM dd, yyyy (dddd)"         Dim date1 As Date = #8/28/2009#         Console.WriteLine(date1.ToString(customFormat))       End Sub End Module