Hi,
Trying to convert a Date from mm/dd/yyyy to dd/mm/yyyy using
Howver VB is throwing the following errorCode:Public Function USToUKDate(ByRef USDate As String) As Date Dim Newdate() As String = USDate.Split("/") 'Converts from US date format "01/20/2001" to UK 01/02/2013' Dim UKDate As String = Newdate(1) & "/" & Newdate(0) & "/" & Newdate(2) USToUKDate = CDate(UKDate)
Any ideas why?Conversion from string "01/27/2010" to type 'Date' is not valid
Thanks


Reply With Quote

