The below code does not trap and validate a date entered in an edittext box if the user accidently adds some extra characters at the end of the date as shown: 2/06/2012kh. The trap works othewise if the characters are inserted inside the string. Any idea?
Dim StarD as edittext
Dim DateTick As Long
Try
DateTick = DateTime.DateParse(StartD.text)
Catch
Msgbox("The Start date you selected may not be correct or missing the slash/.", "")
Return
End Try
Dim StarD as edittext
Dim DateTick As Long
Try
DateTick = DateTime.DateParse(StartD.text)
Catch
Msgbox("The Start date you selected may not be correct or missing the slash/.", "")
Return
End Try