hen you use Convert.ToDateTime, it tries to parse the input string using the Culture settings of the computer that your code is running on. If the string input by the user is not in that format (for example, the user enters "29 Dec 2012" and your Culture is set to US and expects "12/29/2012") then you will get an exception. You will get the same problem if the user enters an invalid date such as "sdfs/wewe/22334"
There are two solutions: use
TryParseExact[
^] instead, and report the problem or the user, or prevent the user from entering a wrong date altogether by using a
DateTimePicker[
^] instead.
Personally, I prefer to prevent problems, and present the user with a "nicer" input method at the same time, so I use a DateTimePicker whenever possible.