Function:
Public Shared Function ConvertoDate(ByVal dateString As String, ByRef result As DateTime) As Boolean
Try
Dim supportedFormats() As String = New String() {"MM/dd/yyyy"}
result = DateTime.ParseExact(dateString, supportedFormats, System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.None)
Return True
Catch ex As Exception
Return False
End Try
End Function
Date String
Dim FlightDateArriveString As String = (FlightMonthArrive.SelectedValue.ToString & "/" & FlightDayArrive.SelectedValue.ToString & "/" & "2010")
*ConvertoDate(FlightDateArriveString)*
The error message is given by the line above ^ and says:
"Arguement not specified for parameter result of public shared function ConvertoDate (datestring as String, ByRef result as date) as Boolean"