Error clearly state that the string is not Null or Empty. Put a check of
String.IsNullOrEmpty(mystring)
, and then do the conversion. It would work.
UDPATE:
based on the changed error, try:
DateTime.ParseExact("18-12-2007", "dd-MM-yyyy", CultureInfo.InvariantCulture)<br />
This is needed to handle the date format you are using which is not a standard one.