hi,
you could try date.parseexact, but again, i have had mixed results with this, i ended up writing this routine to convert my dates, it has only failed me once so far.
Public Shared Function MangleDate(ByVal TheDate As String) As Date
Dim strSystemFormat As String = System.Threading.Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortDatePattern
Dim strDay As String = TheDate.Substring(0, 2)
Dim strMonth As String = TheDate.Substring(3, 2)
Dim strYear As String = TheDate.Substring(6, 4)
strSystemFormat = strSystemFormat.Replace("dd", strDay)
strSystemFormat = strSystemFormat.Replace("MM", strMonth)
strSystemFormat = strSystemFormat.Replace("yyyy", strYear)
Return Date.Parse(strSystemFormat, Nothing, DateTimeStyles.AssumeLocal)
End Function
Try it and see how it goes for you
Si
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).