I have the following code
if(CDate(DtpCCValidUpto.text)<Now()) Then
MessageBox.Show ("Invalid date.")
DtpCCValidUpto.Focus()
Return
endif
i ran the program and in a form enter the date in a DateTimePicker
and the following message appears
No controled Exception 'System.InvalidCast.Exception' in microsoft.visualbasic.dll
Aditional Information: "The convertion of the string 04/22/2006" to Date is not Vaild
How can i solve that?
Thank you
Luis Martin