I get a exception with the error message "System.FormatException: String was not recognized as a valid DateTime." on the following line:
DateTime RecDat