The message is clear: you either have a string not representing a valid date (e.g.
"foo") or the string itself does not represent a valid date in the 'thread current culture' (see the
MSDN
page:
"DateTime.Parse Method"[
^]).
Youd should
debug your code for finding out the exact nature of the problem.