When runnning a process that calls on a custom script that includes a field in DateTime format, an error similar to the following may be seen:
" Conversion of 5/21/1986 12:00:00 AM to Date failed. [System.FormatException] String was not recognized as a valid DateTime."
The "FormatDate" function can be used to ensure that the DateTime is formatted correctly. For example, the script line throwing the error might look like this:
The error can be resolved by modifying the line to look like this:
Person.PutValue("StartDate", FormatDate(Convert(StartDate,"DateTime"), "yyyy-MMMM-dd"))