Display WeekDay and Month of Date

Dim strdate As String = "06/11/2003"
Dim dt As DateTime = DateTime.Parse(strdate)
dt.Parse(strdate)

'Assign first 3 characters of Week Day to string
Dim whichday As String = Left(WeekdayName(Weekday(dt.Date)), 3)
'Assign month to String
Dim whichmonth As String = MonthName(Month(dt))

Dim whichdate As String = dt.ToString("dd")

Dim whichyear As String = dt.ToString("yyyy")
Response.Write(whichday & " " & whichmonth & " " & whichdate & " " & whichyear & "<BR>")

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>