Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validate dates passed as parameters
Message
From
31/03/2004 16:22:42
 
 
To
31/03/2004 16:04:41
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00891236
Message ID:
00891310
Views:
25
Ok... then I will continue to use the TRY/CATCH.

Regards,
Neil

>Hi, Neil-
>
>> I just need a way to make certain that the date converts from character to DateTime without throwing an error. I could wrap the conversion-to-date in a try/ catch construct but I was wondering if there was a better way.
>
>Well, better, how? This is exactly what a Try/Catch would be good for, IMO. You can catch the specific error that the string isn't a valid date. I don't see how else you'd do it unless you go through some convoluted string parsing and analyzing.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform