Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting string to date
Message
From
13/05/2006 18:07:03
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Converting string to date
Miscellaneous
Thread ID:
01121705
Message ID:
01121705
Views:
61
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
Next
Reply
Map
View

Click here to load this message in the networking platform