Mega Code Archive

 
Categories / VB.Net Tutorial / Date Time
 

CDate

Module Tester     Public Sub Main()         Dim sDate As String = "8/1/86"         Dim dtDate As Date = CDate(sDate)         sDate = "15 July, 1215"         dtDate = CDate(sDate)         Console.WriteLine("Date now holds {0}", dtDate)     End Sub End Module Date now holds 15/07/1215 12:00:00 AM