Function to get Date in (Monday, January 11, 2010) format

Posted by Virendradugar under VB.NET category on | Views : 1987
This Shared (Static) function will return the Date in Monday, January 11, 2010 Format.

Public Shared Function GetDateTime() As String
Dim dtDate As Date = DateTime.Now.Date
Dim strDateTime As New StringBuilder()
strDateTime.Append(", " & (MonthName(dtDate.Month)))
strDateTime.Append(" " & dtDate.Day)
strDateTime.Append(", " & dtDate.Year.ToString())
Return strDateTime.ToString()
End Function

Comments or Responses

Login to post response