Urgent: how to convert string into date in vb.net
-
Hi, can u tell me how to convert strings like 12/06/2020 ,12-06-2007 etc in date format. ex: 12/06/2007-------> 12-Dec-2006 12-06-2007-------> 12-Dec-2006 thanks & regards
-
Hi, can u tell me how to convert strings like 12/06/2020 ,12-06-2007 etc in date format. ex: 12/06/2007-------> 12-Dec-2006 12-06-2007-------> 12-Dec-2006 thanks & regards
Check this out _ I never used it myself - but stumbled over it over the last few days when trying to fix my late binding issue .. It copied out of the Help index Imports System Public Class ChangeTypeTest Public Shared Sub Main() Dim d As [Double] = - 2.345 Dim i As Integer = CInt(Convert.ChangeType(d, GetType(Integer))) Console.WriteLine("The double value {0} when converted to an int becomes {1}", d, i) Dim s As String = "12/12/98" Dim dt As DateTime = CType(Convert.ChangeType(s, GetType(DateTime)), DateTime) Console.WriteLine("The string value {0} when converted to a Date becomes {1}", s, dt) End Sub 'Main End Class 'ChangeTypeTest
-
Hi, can u tell me how to convert strings like 12/06/2020 ,12-06-2007 etc in date format. ex: 12/06/2007-------> 12-Dec-2006 12-06-2007-------> 12-Dec-2006 thanks & regards
-
Hi, can u tell me how to convert strings like 12/06/2020 ,12-06-2007 etc in date format. ex: 12/06/2007-------> 12-Dec-2006 12-06-2007-------> 12-Dec-2006 thanks & regards