Convert string value to date using DateTime.Parse and format output

Category VB.Net Sub Category Manipulating Types
Bookmark and Share
Used when needing to show date type in a particular format on the screen
Copy Code
Dim strDate as string = "04/08/2008 00:00:00" String.Format("{0:dd MMM yyyy}", DateTime.Parse(strDate, New System.Globalization.CultureInfo("en-GB"))) 'Output will be "04 Aug 2008"
Share the love
Bookmark and Share