Example of Full Error Message:
Error while updating fields. Error message: line 326, column, illegal assignment from String to Datetime

How this error may happen: 
This error can happen when trying to generate a document and also trying to update Date field once document generation is done.

How to resolve:
If had created a formula field and tried to remove the NOW() from the code, then you also need to copy new button code to the button. If you would like to apply value to some date field, we would suggest that you update some text field and then create Workflow that would update Date field.