String date to date property in automation/workflow with custom code

Please read my comment, just convert your date with valueOf();

You need to have a milliseconds result like this : check here